CVE-2025-31138 json
tarteaucitron.js allows UI manipulation via unrestricted CSS injection
published 2025-04-07 19 mo ago modified 2026-06-17 4 mo ago also EUVD-2025-10043 , GHSA-7524-3396-fqv3
- cvss
- 5.5
- version 3.1, CNA
- cisa kev
- Not listed
- not in CISA's catalog
- epss
- 0.3%
- EPSS 0.3% chance of exploitation in 30 days, percentile 19%
- public exploits
- 0
- none known
Summary
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.
Patch / fix
- npm tarteaucitronjs 1.20.1
- amauri tarteaucitronjs 1.20.1
- tarteaucitron tarteaucitron 1.20.1
CISA SSVC
- Exploitation
- none
- Automatable
- no
- Technical impact
- total
- Assessed
- 19 mo ago
Exploit prediction
0.27% chance of exploitation in the next 30 days, higher than 19% of all scored CVEs (FIRST EPSS, 2026-11-08).
CVSS scores
| assigned by | version | score | vector |
|---|---|---|---|
| CNA | 3.1 | 5.5 | CVSS:3.1/AV:N/AC:L/PR:H/UI:N/S:C/C:L/I:L/A:N |
| GitHub | 3.1 | 5.5 | CVSS:3.1/AV:N/AC:L/PR:H/UI:N/S:C/C:L/I:L/A:N |
| NVD | 3.1 | 6.6 | CVSS:3.1/AV:N/AC:L/PR:H/UI:N/S:C/C:L/I:L/A:L |
Affected packages
| ecosystem | package | affected | fixed in |
|---|---|---|---|
| npm | tarteaucitronjs | <1.20.1 |
1.20.1 |
Affected products
- AmauriC tarteaucitron.js
Classification
- Weakness
-
- CWE-1021 Improper Restriction of Rendered UI Layers or Frames
References
-
github.com
/AmauriC/tarteaucitron.js/commit/25fcf828aaa55306ddc09cfbac9a6f8f126e2d07
web, patch
-
github.com
/AmauriC/tarteaucitron.js/security/advisories/GHSA-7524-3396-fqv3
web, patch, vendor-advisory
-
nvd.nist.gov
/vuln/detail/CVE-2025-31138
advisory
-
github.com
/AmauriC/tarteaucitron.js
package
Sources
- CVE List CVE-2025-31138
- GitHub Advisory GHSA-7524-3396-fqv3
- NVD CVE-2025-31138
Fencer Vulns keeps one entry per vulnerability: the CVE id wins, then GHSA, and records that alias each other are merged, except that two CVEs always keep separate entries. The same data is available as JSON.
CPEs and fixed versions use Anchore's correction of NVD's data: Added CPE configurations because not yet analyzed by NVD.