Skip to main content

Boteraser | Website and Server Security Solutions

🛡️ CVE-2025-31138 — tarteaucitronjs

🟡 CVSS 5.5 — Medium ✅ No Known Exploit CWE-1021 OSV
5.5
CVSS Score
0 Low4 Medium7 High9 Critical10

Description

tarteaucitron.js allows UI manipulation via unrestricted CSS injection

A vulnerability was identified in tarteaucitron.js, where user-controlled inputs for element dimensions (width and height) were not properly validated. This allowed an attacker with direct access to the site's source code or a CMS plugin to set values like 100%;height:100%;position:fixed;, potentially covering the entire viewport and facilitating clickjacking attacks.

Impact

An attacker with high privileges could exploit this vulnerability to:

  • Overlay malicious UI elements on top of legitimate content,
  • Trick users into interacting with hidden elements (clickjacking),
  • Disrupt the intended functionality and accessibility of the website.

Fix https://github.com/AmauriC/tarteaucitron.js/commit/25fcf828aaa55306ddc09cfbac9a6f8f126e2d07

The issue was resolved by enforcing strict validation and sanitization of user-provided CSS values to prevent unintended UI manipulation.

How this vulnerability can be exploited

This issue can be reached over the network, attack complexity is low, an attacker needs administrative privileges on the target. No user interaction is required. The scope is changed, meaning a successful attack can affect components beyond the vulnerable one. Rated impact: confidentiality low, integrity low, availability none.

CVSS metrics in full

The score comes from this vector: CVSS:3.1/AV:N/AC:L/PR:H/UI:N/S:C/C:L/I:L/A:N

  • Attack vector: Network — reachable from anywhere that can route to the service.
  • Attack complexity: Low — the attack works reliably, with no preparation.
  • Privileges required: High — administrative rights are needed first.
  • User interaction: None — nobody has to be tricked into anything.
  • Scope: Changed — a successful attack reaches components beyond the vulnerable one.
  • Confidentiality impact: Low — limited, and the attacker does not choose what is affected.
  • Integrity impact: Low — limited, and the attacker does not choose what is affected.
  • Availability impact: None.

Weakness class

CVE-2025-31138 is classified as CWE-1021: Improper Restriction of Rendered UI Layers. The interface can be framed or overlaid by another site, so clicks can be redirected without the user noticing.

Affected software

CVE-2025-31138 is recorded against 1 package.

  • tarteaucitronjs

Timeline and source

Published on 7 April 2025 and last revised on 17 June 2026. No public exploit is currently recorded for this entry. A vendor advisory or fix has been published. Record sourced from OSV.

References

github.com (Web)
nvd.nist.gov (Advisory)
github.com (Web)
github.com (Package)

Other advisories for this package

tarteaucitronjs has other advisories on record. If you are patching this one, these are worth checking on the same host:

Same weakness in other software

These advisories are the same class of weakness (CWE-1021: Improper Restriction of Rendered UI Layers) in other software:

Details

Severity MEDIUM
CVSS Score 5.5
CVSS Vector CVSS:3.1/AV:N/AC:L/PR:H/UI:N/S:C/C:L/I:L/A:N
CWE CWE-1021
Public Exploit ✅ No
Source OSV
Published 2025-04-07
Updated 2026-08-20
Modified 2026-06-17

Affected Packages

Software From version Fixed in
tarteaucitronjs

Similar Threats

Vulnerability Monitoring

Track new vulnerabilities in tarteaucitronjs

CVE-2025-31138 is rated CVSS 5.5 Medium. BotEraser monitors your WordPress installation and notifies you when software you use appears in our vulnerability database.

Set Up Free Alerts →

No credit card required  ·  Results in minutes

ⓘ Data Notice: The information presented above has been compiled from publicly available internet sources. Boteraser aggregates this data solely for informational purposes and does not independently classify, evaluate, or endorse any findings about the vulnerabilities listed. The accuracy and completeness of this information is the sole responsibility of the original publishers. Boteraser and its operators accept no liability for any decisions made based on this data.

Browse related advisories

All advisoriesCVECVE 2025