CVE-2025-48939

tarteaucitron.js vulnerable to DOM Clobbering via document.currentScript

Published Jul 3, 2025 CVSS 3.1 · 4.2 Medium EPSS < 1% KEV · Not listed
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.

Remediation

No solution or workaround provided in the CVE record

Tracking

Sign in to view the affected projects.

Advisories

Source ID Title
EUVD EUVD EUVD-2025-19885 tarteaucitron.js vulnerable to DOM Clobbering via document.currentScript
Github GHSA Github GHSA GHSA-q43x-79jr-cq98 tarteaucitron.js vulnerable to DOM Clobbering via document.currentScript
History
Type Values Removed Values Added
First Time appeared Amauri
Amauri tarteaucitronjs
CPEs cpe:2.3:a:amauri:tarteaucitronjs:*:*:*:*:*:node.js:*:*
Vendors & Products Amauri
Amauri tarteaucitronjs
Type Values Removed Values Added
Metrics ssvc

{'options': {'Automatable': 'no', 'Exploitation': 'none', 'Technical Impact': 'partial'}, 'version': '2.0.3'}

Type Values Removed Values Added
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.
Title tarteaucitron.js vulnerable to DOM Clobbering via document.currentScript
Weaknesses CWE-138
References
Metrics cvssV3_1

{'score': 4.2, 'vector': 'CVSS:3.1/AV:L/AC:L/PR:H/UI:R/S:C/C:N/I:L/A:L'}

Weaknesses

Sources

Status
PUBLISHED
Assigner
GitHub_M
Published
Updated
Jul 3, 2025, 7:15 PM
Reserved
May 28, 2025, 6:49 PM
Status
Analyzed
Published
Jul 3, 2025, 5:15 PM
Modified
Jun 17, 2026, 9:30 AM