Vulnerability library
Security checkJuly 03, 2025

tarteaucitron.js vulnerable to DOM Clobbering via document.currentScript

Understand the exposure, see the recommended fix, and check whether your own website has related weaknesses.

Medium severitynpmtarteaucitronjs

Check your website

Find this and other vulnerabilities with a free scan.

Your scan runs on your computer. No account required.

Description

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:

it could clobber the document.currentScript property.

Recommendation

Update the tarteaucitronjs package to the latest compatible version. Followings are version details:

  • Affected version(s): < 1.22.0
  • Patched version(s): 1.22.0

References

Could your website be exposed too?

SmartScanner can check your website for tarteaucitron.js vulnerable to DOM Clobbering via document.currentScript and gives you actionable findings to investigate.

Start a free scan

Related Issues

See something that needs correcting? Let us knowUpdated July 03, 2025