# CVE-2025-31475: tarteaucitron.js allows prototype pollution via custom text injection

- Severity: Medium 5.5 (CVSS:3.1, scored by GitHub_M) `CVSS:3.1/AV:N/AC:L/PR:H/UI:N/S:C/C:L/I:L/A:N`
- Known to be exploited: not in CISA's catalogue, which lists only what CISA has confirmed
- Likelihood of exploitation in the next 30 days (EPSS): 0.35%, higher than 30% of CVEs (2026-12-01)
- Published: 2025-04-07T14:48:25.164Z
- Modified: 2026-06-17T09:10:28.010Z
- Also known as: GHSA-4hwx-xcc5-2hfc
- Weaknesses: CWE-1321
- SSVC (CISA-ADP): exploitation none, automatable no, technical impact total
- Assigned by: GitHub_M

## Description

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.

(As written by CVE List.)

## Affected

- AmauriC tarteaucitron.js: < 1.20.1
- tarteaucitronjs (npm): before 1.20.1
- amauri tarteaucitronjs: before 1.20.1

## Every score

- GitHub_M: CVSS:3.1 5.5 Medium `CVSS:3.1/AV:N/AC:L/PR:H/UI:N/S:C/C:L/I:L/A:N`
- GitHub: CVSS:3.1 5.5 Medium `CVSS:3.1/AV:N/AC:L/PR:H/UI:N/S:C/C:L/I:L/A:N`
- NVD: CVSS:3.1 6.6 Medium `CVSS:3.1/AV:N/AC:L/PR:H/UI:N/S:C/C:L/I:L/A:L`

## References

- <https://github.com/AmauriC/tarteaucitron.js/security/advisories/GHSA-4hwx-xcc5-2hfc> (vendor-advisory, web)
- <https://github.com/AmauriC/tarteaucitron.js/commit/74c354c413ee3f82dff97a15a0a43942887c2b5b> (patch, web)
- <https://nvd.nist.gov/vuln/detail/CVE-2025-31475> (advisory)
- <https://github.com/AmauriC/tarteaucitron.js> (package)

## Sources

- CVE List: [CVE-2025-31475](https://www.cve.org/CVERecord?id=CVE-2025-31475), CVE Terms of Use, modified 2025-04-07
- GitHub Advisory Database: [GHSA-4hwx-xcc5-2hfc](https://github.com/advisories/GHSA-4hwx-xcc5-2hfc), CC-BY-4.0, modified 2025-04-07
- NVD: [CVE-2025-31475](https://nvd.nist.gov/vuln/detail/CVE-2025-31475), Public domain, modified 2026-06-17

---

Page: https://cve.day/CVE-2025-31475 · Whole record: https://cve.day/CVE-2025-31475.json · Rebuilt by cve.day 2026-11-25T22:58:56.156Z
