# CVE-2025-31138: tarteaucitron.js allows UI manipulation via unrestricted CSS injection

- Severity: Medium 5.5 (CVSS:3.1, scored by GitHub_M) `CVSS:3.1/AV:N/AC:L/PR:H/UI:N/S:C/C:L/I:L/A:N`
- Known to be exploited: not in CISA's catalogue, which lists only what CISA has confirmed
- Likelihood of exploitation in the next 30 days (EPSS): 0.27%, higher than 20% of CVEs (2026-12-01)
- Published: 2025-04-07T14:44:40.370Z
- Modified: 2026-06-17T09:09:55.413Z
- Also known as: GHSA-7524-3396-fqv3
- Weaknesses: CWE-1021
- SSVC (CISA-ADP): exploitation none, automatable no, technical impact total
- Assigned by: GitHub_M

## 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.

(As written by CVE List.)

## Affected

- AmauriC tarteaucitron.js: < 1.20.1
- tarteaucitronjs (npm): before 1.20.1
- amauri tarteaucitronjs: before 1.20.1

## Every score

- GitHub_M: CVSS:3.1 5.5 Medium `CVSS:3.1/AV:N/AC:L/PR:H/UI:N/S:C/C:L/I:L/A:N`
- GitHub: CVSS:3.1 5.5 Medium `CVSS:3.1/AV:N/AC:L/PR:H/UI:N/S:C/C:L/I:L/A:N`
- NVD: CVSS:3.1 6.6 Medium `CVSS:3.1/AV:N/AC:L/PR:H/UI:N/S:C/C:L/I:L/A:L`

## References

- <https://github.com/AmauriC/tarteaucitron.js/security/advisories/GHSA-7524-3396-fqv3> (patch, vendor-advisory, web)
- <https://github.com/AmauriC/tarteaucitron.js/commit/25fcf828aaa55306ddc09cfbac9a6f8f126e2d07> (patch, web)
- <https://nvd.nist.gov/vuln/detail/CVE-2025-31138> (advisory)
- <https://github.com/AmauriC/tarteaucitron.js> (package)

## Sources

- CVE List: [CVE-2025-31138](https://www.cve.org/CVERecord?id=CVE-2025-31138), CVE Terms of Use, modified 2025-04-07
- GitHub Advisory Database: [GHSA-7524-3396-fqv3](https://github.com/advisories/GHSA-7524-3396-fqv3), CC-BY-4.0, modified 2025-04-07
- NVD: [CVE-2025-31138](https://nvd.nist.gov/vuln/detail/CVE-2025-31138), Public domain, modified 2026-06-17

---

Page: https://cve.day/CVE-2025-31138 · Whole record: https://cve.day/CVE-2025-31138.json · Rebuilt by cve.day 2026-11-25T22:58:56.155Z
