Executive brief
tarteaucitron.js is a JavaScript library for managing cookies and user consent on websites. An attacker with admin access to the site or its CMS could inject malicious CSS values through width/height parameters to overlay fake interface elements, trick users into clicking hidden buttons (clickjacking), or disrupt the page layout—potentially compromising user trust or enabling credential theft.
Technical details
The vulnerability is an improper restriction of rendered UI layers (CWE-1021) caused by inadequate validation of user-controlled CSS properties for element dimensions. An attacker with high privileges (code access or CMS control) can supply unvalidated width and height parameters containing CSS injection payloads such as "100%;height:100%;position:fixed;" to cover the viewport and facilitate clickjacking attacks. The vulnerability requires network access and high privilege level but no user interaction. The fix (commit 25fcf82) enforces strict validation and sanitization of CSS values. The vulnerability was patched in version 1.20.1 and affected all prior versions.
Affected products
- Amauri Céjero tarteaucitron.js below 1.20.1
Timeline
- 2025-04-07: disclosed
- 2025-04-07: patched: version 1.20.1