CVE-2025-31476:
tarteaucitron.js allows url scheme injection via unfiltered inputs
4.8
CVSS Score
3.1
Basic Information
CVE ID
GHSA ID
EPSS Score
0.11887%
CWE
Published
4/7/2025
Updated
4/7/2025
KEV Status
No
Technology
JavaScript
Technical Details
CVSS Vector
CVSS:3.1/AV:N/AC:L/PR:H/UI:R/S:C/C:L/I:L/A:N
Package Name | Ecosystem | Vulnerable Versions | First Patched Version |
---|---|---|---|
tarteaucitronjs | npm | < 1.20.1 | 1.20.1 |
Vulnerability Intelligence
Miggo AI
Root Cause Analysis
The security patch modifies the getElemAttr function to add validation for URL attributes and restrict srcdoc handling. This indicates:
- The function was responsible for processing element attributes including URLs
- Pre-patch versions lacked proper scheme validation (allowed javascript:)
- The function's output was used in contexts where unvalidated URLs could trigger XSS
- The vulnerability manifests when this function processes malicious 'url' or 'srcdoc' attributes, which would appear in stack traces during exploitation