tarteaucitron.js allows UI manipulation via unrestricted CSS injection
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.
- Products
- Not specified
- Affected versions
- Not specified
- Fixed versions
- Not specified
- CVEs
- CVE-2025-31138
- Confirmed fixed CVEs
- Not specified
- Updated in this feed
- 5 Nov 2026, 05:38 UTC · Revision 1
Source evidence
tarteaucitron.js allows UI manipulation via unrestricted CSS injection
core-osv · Original sourcePublished 7 Apr 2025, 14:44 UTC
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.
osv:CVE-2025-31138
Complete source record
{
"id": "964c343c1923ee3577c405a951b55edd5c3c218fb7c3e8735c97d386ff4a25fb",
"url": "https://osv.dev/vulnerability/CVE-2025-31138",
"method": "structured",
"payload": {
"kind": "advisory",
"title": "tarteaucitron.js allows UI manipulation via unrestricted CSS injection",
"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.",
"evidence": "osv:CVE-2025-31138",
"products": [],
"severity": "medium",
"structured": {
"id": "CVE-2025-31138",
"aliases": [
"CVE-2025-31138",
"GHSA-7524-3396-fqv3"
],
"metrics": [
{
"type": "CVSS_V3",
"score": "CVSS:3.1/AV:N/AC:L/PR:H/UI:N/S:C/C:L/I:L/A:N"
}
],
"affected": [
{
"ranges": [
{
"repo": "https://github.com/amauric/tarteaucitron.js",
"type": "GIT",
"events": [
{
"introduced": "0"
},
{
"fixed": "034867f11242259dd22bb93328681bd6ce3d718d"
},
{
"fixed": "25fcf828aaa55306ddc09cfbac9a6f8f126e2d07"
}
],
"database_specific": {
"extracted_events": [
{
"cpe": "cpe:2.3:a:amauri:tarteaucitronjs:*:*:*:*:*:node.js:*:*",
"range": [
{
"introduced": "0"
},
{
"fixed": "1.20.1"
}
],
"source": "CPE_RANGE"
},
{
"range": [
{
"fixed": "25fcf828aaa55306ddc09cfbac9a6f8f126e2d07"
}
],
"source": "REFERENCES_COMMIT"
}
]
}
}
],
"versions": [
"v1.19.0",
"v1.18.1",
"v1.18.0",
"v1.17.0",
"v1.16.1",
"v1.16.0",
"v1.15.0",
"v1.14.0",
"v1.13.1",
"v1.13.0",
"v1.12.0",
"v1.11.0",
"v1.10.0",
"v1.9.9",
"v1.9.8",
"v1.9.7",
"v1.9.6",
"v1.9.5",
"v1.9.4",
"v1.9.3",
"v1.9.1",
"20210329",
"20210306",
"20210305",
"v1.8.4",
"v1.8.3",
"v1.8.2",
"v1.8.1",
"v1.8",
"v1.6",
"v1.5",
"20200910",
"v1.4",
"v1.3",
"v1.2.0",
"v1.2",
"V1.2",
"v1.1",
"v1.0",
"v0.1"
],
"database_specific": {
"source": "https://storage.googleapis.com/cve-osv-conversion/osv-output/CVE-2025-31138.json"
}
}
],
"modified": "2026-10-28T02:30:42.924156345Z",
"provider": "osv",
"references": [
"https://github.com/AmauriC/tarteaucitron.js/security/advisories/GHSA-7524-3396-fqv3",
"https://github.com/CVEProject/cvelistV5/tree/main/cves/2025/31xxx/CVE-2025-31138.json",
"https://nvd.nist.gov/vuln/detail/CVE-2025-31138",
"https://github.com/AmauriC/tarteaucitron.js/commit/25fcf828aaa55306ddc09cfbac9a6f8f126e2d07"
],
"provider_metadata": {
"cwe_ids": [
"CWE-1021"
],
"cna_assigner": "GitHub_M",
"osv_generated_from": "https://github.com/CVEProject/cvelistV5/tree/main/cves/2025/31xxx/CVE-2025-31138.json"
}
},
"related_cves": [
{
"value": "CVE-2025-31138",
"evidence": "/id"
}
],
"security_relevant": true,
"severity_evidence": "/severity/0/score"
},
"source_id": "core-osv",
"document_id": 510761,
"published_at": "2025-04-07T14:44:40.37+00:00"
}