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.
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
Fixes

Solution

No solution given by the vendor.


Workaround

No workaround given by the vendor.

History

Tue, 21 Oct 2025 14:00:00 +0000

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

Thu, 03 Jul 2025 20:15:00 +0000

Type Values Removed Values Added
Metrics ssvc

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


Thu, 03 Jul 2025 16:45:00 +0000

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'}


cve-icon MITRE

Status: PUBLISHED

Assigner: GitHub_M

Published:

Updated: 2025-07-03T19:15:22.798Z

Reserved: 2025-05-28T18:49:07.580Z

Link: CVE-2025-48939

cve-icon Vulnrichment

Updated: 2025-07-03T19:14:17.594Z

cve-icon NVD

Status : Analyzed

Published: 2025-07-03T17:15:39.300

Modified: 2025-10-21T13:56:42.543

Link: CVE-2025-48939

cve-icon Redhat

No data.

cve-icon OpenCVE Enrichment

No data.