{"id":"CVE-2025-31138","published":"2025-04-07T14:44:40Z","modified":"2025-04-07T15:49:04Z","title":"tarteaucitron.js allows UI manipulation via unrestricted CSS injection","vendor":"AmauriC","product":"tarteaucitron.js","tier":"tail","description":{"text":"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.","provenance":"source","from":"CVE.org"},"cvss":{"score":5.5,"severity":"MEDIUM","version":"3.1","vector":"CVSS:3.1/AV:N/AC:L/PR:H/UI:N/S:C/C:L/I:L/A:N","provenance":"source","from":"CVE.org CNA"},"epss":{"score":0.00472,"percentile":0.32997,"provenance":"source"},"cwes":[{"id":"CWE-1021","name":"Improper Restriction of Rendered UI Layers or Frames"}],"references":[{"url":"https://github.com/AmauriC/tarteaucitron.js/security/advisories/GHSA-7524-3396-fqv3","tags":["x_refsource_CONFIRM"]},{"url":"https://github.com/AmauriC/tarteaucitron.js/commit/25fcf828aaa55306ddc09cfbac9a6f8f126e2d07","tags":["x_refsource_MISC"]}],"priority":{"score":10.4,"factors":[{"name":"EPSS percentile","points":6.6},{"name":"CVSS severity","points":3.85}]},"vendorSlug":"amauric","affectedVersions":[{"vendor":"AmauriC","product":"tarteaucitron.js","versions":["< 1.20.1"]}],"ssvc":{"exploitation":"none","automatable":"no","technicalImpact":"total","timestamp":"2025-04-07T15:45:34.187296Z","from":"CISA ADP","provenance":"source"},"affected":[{"ecosystem":"npm","package":"tarteaucitronjs","vulnerableRanges":["<1.20.1"],"patched":["1.20.1"],"from":["GHSA-7524-3396-fqv3"],"provenance":"source"}],"summary":{"text":"The tarteaucitron.js cookie banner library, in versions before 1.20.1, does not properly validate user-controlled width and height values for its elements, so crafted CSS can be injected into the page. An attacker who has high privileges, such as direct access to the site's source code or a CMS plugin, can use this to overlay malicious UI elements across the viewport, enabling clickjacking, UI disruption, or accessibility impairment, with no user interaction required.","provenance":"ai","model":"claude-haiku-5-5","generatedAt":"2026-11-20T22:14:05Z"},"euvd":{"id":"EUVD-2025-10043","exploited":false,"provenance":"source"},"lineage":{"familyId":"fam-amauric-tarteaucitron-js-cve-2025-31138","children":[{"from":"CVE-2025-31138","to":"CVE-2026-22809","relation":"related","confidence":"medium","kind":"lineage","evidence":[{"kind":"same-code","provenance":"machine","files":["tarteaucitron.services.js","tarteaucitron.services.min.js"],"commits":["https://github.com/AmauriC/tarteaucitron.js/commit/25fcf828aaa55306ddc09cfbac9a6f8f126e2d07","https://github.com/AmauriC/tarteaucitron.js/commit/f0bbdac2fdf3cd24a325fc0928c0d34abf1b7b52"],"basis":"rarely changed file"}]}],"packageHistory":[{"cve":"CVE-2023-3620","published":"2023-07-11","fixed":"1.13.1","kev":false},{"cve":"CVE-2025-1467","published":"2025-02-23","fixed":"1.17.0","kev":false,"link":{"from":"CVE-2025-1467","to":"CVE-2025-31138","relation":"successor","confidence":"low","kind":"sequence","evidence":[{"kind":"version-step","provenance":"source","package":"npm:tarteaucitronjs","fromFixed":"1.17.0","toFixed":"1.20.1","daysApart":43}]}},{"cve":"CVE-2025-31138","published":"2025-04-07","fixed":"1.20.1","kev":false},{"cve":"CVE-2025-31475","published":"2025-04-07","fixed":"1.20.1","kev":false},{"cve":"CVE-2025-31476","published":"2025-04-07","fixed":"1.20.1","kev":false},{"cve":"CVE-2025-48939","published":"2025-07-03","fixed":"1.22.0","kev":false}],"package":"npm:tarteaucitronjs"}}