CVE-2025-31138
tarteaucitron.js allows UI manipulation via unrestricted CSS injection
Also known as GHSA-7524-3396-fqv3
Mitigation
- Upgrade tarteaucitronjs to 1.20.1 or later.
Who should check
- Projects that depend on npm package tarteaucitronjs (< 1.20.1)
- Anyone running AmauriC tarteaucitron.js < 1.20.1
Vulnerability facts
- Affected
- tarteaucitronjs < 1.20.1
- Fixed in
- 1.20.1
- Exploited in the wild
- Not in CISA KEV
- Public exploit / PoC
- None known
- Remote exploitation
- Remote, login needed
- CVSS
- 5.5 (v3.1, CNA)CVSS:3.1/AV:N/AC:L/PR:H/UI:N/S:C/C:L/I:L/A:NOpen in CVSS calculator
Show all 8 CVSS metrics
- Attack vector: Network
- Attack complexity: Low
- Privileges required: High
- User interaction: None
- Scope: Changed (impact reaches other components)
- Confidentiality impact: Low
- Integrity impact: Low
- Availability impact: None
- EPSS
- 0.47% chance of exploitation in 30 days (percentile 33, 2026-11-26)
- CWE
- CWE-1021
- Modified
Description
tarteaucitron.js is a compliant and accessible cookie banner. A vulnerability was identified in tarteaucitron.js prior to 1.20.1, 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. 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), or disrupt the intended functionality and accessibility of the website. This vulnerability is fixed in 1.20.1.
Affected and fixed versions
| Package / product | Affected | Fixed | Source |
|---|---|---|---|
| npm tarteaucitronjs | < 1.20.1 | 1.20.1 | osv |
| AmauriC tarteaucitron.js | < 1.20.1 | — | cvelist |
Check your systems with an agent
Paste this into Claude Code, Cursor or another coding agent. It only reads; it changes nothing.
Check whether anything I run is affected by CVE-2025-31138. Work read-only: do not install, upgrade, delete or change anything. Details: https://flawdb.com/CVE-2025-31138.md Affected: tarteaucitronjs < 1.20.1 Fixed in: 1.20.1 Steps: 1. Search this machine and project for tarteaucitronjs (npm), AmauriC tarteaucitron.js: dependency manifests and lockfiles, installed packages, container images and running services. 2. For each match, note the installed version and whether it is inside the affected range. 3. Report a table: location, installed version, affected (yes / no / unsure), evidence. If affected, say which fixed version or mitigation from the details link applies, but don't apply it.
References
Vendor advisories
FAQ
Is CVE-2025-31138 being exploited?
There is no confirmed exploitation: CVE-2025-31138 is not in the CISA Known Exploited Vulnerabilities catalog. No public exploit code is known. EPSS estimates a 0.47% chance of exploitation in the next 30 days (as of 2026-11-26).
How serious is CVE-2025-31138?
Medium: CVSS 5.5 (v3.1, scored by CNA). Remote, login needed.
Which versions are affected by CVE-2025-31138?
tarteaucitronjs < 1.20.1.
Is there a fix for CVE-2025-31138?
Yes. Fixed in 1.20.1. Upgrade tarteaucitronjs to 1.20.1 or later.
How do I check if I'm affected by CVE-2025-31138?
Find where you use the affected software (dependency lockfiles, installed packages, container images, servers) and compare the installed version with the affected range above. The agent prompt on this page does this read-only.