Track vulnerabilities like this one.
Sign up free to get alerted when software you use is affected.
5.5
CVE-2025-31475: tarteaucitron.js custom text feature lets attackers alter site behavior
CVE-2025-31475 · published 1 year ago
Summary
If you are using tarteaucitron.js version earlier than 1.20.1, the function that adds custom text does not check the input properly. Someone who can edit your site’s code or a plugin could trick the script into changing core JavaScript behavior, which may cause data errors, crashes or unexpected actions. Update tarteaucitron.js to version 1.20.1 or later to stop this risk.
What to do
- Update amauri tarteaucitronjs to version 1.20.1.
Affected software
| Ecosystem | Vendor | Product | Affected versions |
|---|---|---|---|
| npm | amauri | tarteaucitronjs |
< 1.20.1 Fix: upgrade to 1.20.1
|
| – | amauri | tarteaucitronjs |
< 1.20.1 cpe:2.3:a:amauri:tarteaucitronjs:*:*:*:*:*:node.js:*:* |
Original advisory text
tarteaucitron.js allows prototype pollution via custom text injection
tarteaucitron.js is a compliant and accessible cookie banner. A vulnerability was identified in tarteaucitron.js prior to 1.20.1, where the addOrUpdate function, used for applying custom texts, did not properly validate input. This allowed an attacker with direct access to the site's source code or a CMS plugin to manipulate JavaScript object prototypes, leading to potential security risks such as data corruption or unintended code execution. An attacker with high privileges could exploit this vulnerability to modify object prototypes, affecting core JavaScript behavior, cause application crashes or unexpected behavior, or potentially introduce further security vulnerabilities depending on the application's architecture. This vulnerability is fixed in 1.20.1.
References
- https://github.com/advisories/GHSA-4hwx-xcc5-2hfc
- https://github.com/AmauriC/tarteaucitron.js/security/advisories/GHSA-4hwx-xcc5-2... Vendor Advisory
- https://nvd.nist.gov/vuln/detail/CVE-2025-31475 Vendor Advisory
- https://github.com/CVEProject/cvelistV5/tree/main/cves/2025/31xxx/CVE-2025-31475... Vendor Advisory
- https://github.com/AmauriC/tarteaucitron.js/commit/74c354c413ee3f82dff97a15a0a43... Patch
Internet-facing
14 days
Internal
At next upgrade
- Not known to be exploited
- Needs hands-on effort to exploit
- Gives an attacker full control
Type
CWE-1321Prototype Pollution
Timeline
Published7 Apr 2025
Updated4 Nov 2026
First seen6 Mar 2026
Track software like this
Free during beta