5.5medium
tarteaucitron.js allows UI manipulation via unrestricted CSS injection
- Severity
- 5.5medium CVSS:3.1 by GitHub_M
- Exploit likelihood
- 0.27% (higher than 20% of CVEs; EPSS, by FIRST)
- Published
- Last changed
- Assigned by
- GitHub_M
- Also known as
- GHSA-7524-3396-fqv3
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
| Product or package | Versions | Reported by |
|---|---|---|
| AmauriC tarteaucitron.js | < 1.20.1 | CVE List |
| tarteaucitronjs (npm) | before 1.20.1 | GitHub Advisory Database |
| amauri tarteaucitronjs | before 1.20.1 | NVD |
All scores
| GitHub_M | 5.5medium CVSS:3.1 | CVSS:3.1/AV:N/AC:L/PR:H/UI:N/S:C/C:L/I:L/A:N |
| GitHub | 5.5medium CVSS:3.1 | CVSS:3.1/AV:N/AC:L/PR:H/UI:N/S:C/C:L/I:L/A:N |
| NVD | 6.6medium CVSS:3.1 | CVSS:3.1/AV:N/AC:L/PR:H/UI:N/S:C/C:L/I:L/A:L |
Classification
SSVC (CISA-ADP): exploitation none, automatable no, technical impact total.
What each source says
CVE List
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.
GitHub Advisory Database
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.
NVD (es)
tarteaucitron.js es un banner de cookies compatible y accesible. Se identificó una vulnerabilidad en tarteaucitron.js antes de la versión 1.20.1, donde las entradas controladas por el usuario para las dimensiones de los elementos (ancho y alto) no se validaban correctamente. Esto permitía a un atacante con acceso directo al código fuente del sitio o a un complemento de CMS establecer valores como 100%;height:100%;position:fixed;, lo que podría cubrir toda la ventana gráfica y facilitar ataques de clickjacking. Un atacante con privilegios elevados podría explotar esta vulnerabilidad para superponer elementos maliciosos de la interfaz de usuario sobre contenido legítimo, engañar a los usuarios para que interactúen con elementos ocultos (clickjacking) o interrumpir la funcionalidad y la accesibilidad previstas del sitio web. Esta vulnerabilidad se corrigió en la versión 1.20.1.
References
Sources
| Source | Record | Licence |
|---|---|---|
| CVE List | CVE-2025-31138 changed 2025-04-07 | CVE Terms of Use |
| GitHub Advisory Database | GHSA-7524-3396-fqv3 changed 2025-04-07 | CC-BY-4.0 |
| NVD | CVE-2025-31138 changed 2026-06-17 | Public domain |