Skip to main content

Boteraser | Website and Server Security Solutions

🛡️ CVE-2025-48939 — tarteaucitronjs

🟡 CVSS 4.2 — Medium ⚠️ Exploit Public CWE-138 OSV
4.2
CVSS Score
0 Low4 Medium7 High9 Critical10

Description

tarteaucitron.js vulnerable to DOM Clobbering via document.currentScript

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 such as:

```

<img name="currentScript" src="https://malicious.example.com">

```

it could clobber the document.currentScript property. This causes the script to resolve incorrectly to an <img> 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 (e.g., name="currentScript") become properties on the global document object.

Impact

An attacker with control over the HTML could exploit this to change the CDN domain of tarteaucitron.

Fix https://github.com/AmauriC/tarteaucitron.js/commit/230a3b69d363837acfa895823d841e0608826ba3

The issue was resolved by verifying that document.currentScript is an instance of HTMLScriptElement. If not, the script now falls back safely to the last <script> tag on the page.

How this vulnerability can be exploited

This issue can be reached with local access to the system, attack complexity is low, an attacker needs administrative privileges on the target. A user must be tricked into taking some action. The scope is changed, meaning a successful attack can affect components beyond the vulnerable one. Rated impact: confidentiality none, integrity low, availability low.

CVSS metrics in full

The score comes from this vector: CVSS:3.1/AV:L/AC:L/PR:H/UI:R/S:C/C:N/I:L/A:L

  • Attack vector: Local — a local account, shell or session on the host is needed.
  • Attack complexity: Low — the attack works reliably, with no preparation.
  • Privileges required: High — administrative rights are needed first.
  • User interaction: Required — someone has to click, open or visit something.
  • Scope: Changed — a successful attack reaches components beyond the vulnerable one.
  • Confidentiality impact: None.
  • Integrity impact: Low — limited, and the attacker does not choose what is affected.
  • Availability impact: Low — limited, and the attacker does not choose what is affected.

Weakness class

CVE-2025-48939 is classified as CWE-138: Improper Neutralization of Special Elements. The product receives input from an upstream component, but it does not neutralize or incorrectly neutralizes special elements that could be interpreted as control elements or syntactic markers when they are sent to a downstream component.

Affected software

CVE-2025-48939 is recorded against 1 package.

  • tarteaucitronjs

Timeline and source

Published on 3 July 2025 and last revised on 17 June 2026. A public exploit is known to exist, which raises the urgency of patching considerably. A vendor advisory or fix has been published. Record sourced from OSV.

References

github.com (Web)
nvd.nist.gov (Advisory)
github.com (Web)
github.com (Package)

Other advisories for this package

tarteaucitronjs has other advisories on record. If you are patching this one, these are worth checking on the same host:

Same weakness in other software

These advisories are the same class of weakness (CWE-138: Improper Neutralization of Special Elements) in other software:

Details

Severity MEDIUM
CVSS Score 4.2
CVSS Vector CVSS:3.1/AV:L/AC:L/PR:H/UI:R/S:C/C:N/I:L/A:L
CWE CWE-138
Public Exploit ⚠️ Yes
Source OSV
Published 2025-07-03
Updated 2026-08-20
Modified 2026-06-17

Affected Packages

Software From version Fixed in
tarteaucitronjs

Similar Threats

Exploit Protection

Are you running tarteaucitronjs?

CVE-2025-48939 carries CVSS 4.2 Medium rating and a public exploit already exists. BotEraser checks your installation against this and other known CVE records, and blocks IPs associated with exploit activity.

Check My Site For CVE-2025-48939 →

No credit card required  ·  Results in minutes

ⓘ Data Notice: The information presented above has been compiled from publicly available internet sources. Boteraser aggregates this data solely for informational purposes and does not independently classify, evaluate, or endorse any findings about the vulnerabilities listed. The accuracy and completeness of this information is the sole responsibility of the original publishers. Boteraser and its operators accept no liability for any decisions made based on this data.

Browse related advisories

All advisoriesCVECVE 2025