Medium severity · published Jul 3, 2025
CVE-2025-48939
tarteaucitron.js vulnerable to DOM Clobbering via document.currentScript
4.2
CVSS
0.2%
EPSS
No
On KEV
Description
tarteaucitron.js is a compliant and accessible cookie banner. Prior to version 1.22.0, a vulnerability was identified in tarteaucitron.js where document.currentScript was accessed without verifying that it referenced an actual <script> element. If an attacker injected an HTML element, it could clobber the document.currentScript property. This causes the script to resolve incorrectly to an element instead of the <script> tag, leading to unexpected behavior or failure to load the script path correctly. This issue arises because in some browser environments, named DOM elements become properties on the global document object. An attacker with control over the HTML could exploit this to change the CDN domain of tarteaucitron. This issue has been patched in version 1.22.0.
CVSS vector
CVSS:3.1/AV:L/AC:L/PR:H/UI:R/S:C/C:N/I:L/A:L
Attack vector
Local
Complexity
Low
Privileges
High
User interaction
Required
Confidentiality
None
Integrity
Low
Availability
Low
Scope
Changed
Exploitation
Is it being used?
Exploit prediction (EPSS)0.2% · higher than 10% of CVEs
Exploited in the wildNo evidence yet
CISA KEVNot listed
Ransomware campaign useNot known
Affected products
Which versions
TA
tarteaucitron.js · AmauriC
< 1.22.0 · source: vendor
TA
Tarteaucitronjs · Amauri
before 1.22.0 · source: NVD
References
NVD
https://nvd.nist.gov/vuln/detail/CVE-2025-48939
CVE.org
https://www.cve.org/CVERecord?id=CVE-2025-48939
Patch
https://github.com/AmauriC/tarteaucitron.js/commit/230a3b69d363837acfa895823d841e0608826ba3
Exploit
https://github.com/AmauriC/tarteaucitron.js/security/advisories/GHSA-q43x-79jr-cq98
More from tarteaucitron.js
6.6
CVE-2025-31475
tarteaucitron.js allows prototype pollution via custom text injection
6.6
CVE-2025-31138
tarteaucitron.js allows UI manipulation via unrestricted CSS injection
5.4
CVE-2026-111713
tarteaucitron.js before 1.37.0 XSS via getElemAttr Attribute Validation Mismatch
4.8
CVE-2025-31476
tarteaucitron.js allows url scheme injection via unfiltered inputs
4.4
CVE-2026-22809
tarteaucitron.js has Regular Expression Denial of Service (ReDoS) vulnerability
