CVE-2025-31476
JavaScript vulnerability analysis and mitigation

Overview

tarteaucitron.js, a compliant and accessible cookie banner, was found to contain a vulnerability (CVE-2025-31476) that was disclosed on April 7, 2025. The vulnerability allows users with high privileges (those with access to the site's source code or a CMS plugin) to enter URLs containing insecure schemes such as javascript:alert(). The issue affects versions prior to 1.20.1, where insufficient URL validation could lead to arbitrary JavaScript execution if a user clicked on a malicious link (GitHub Advisory).

Technical details

The vulnerability stems from inadequate URL validation in the application's input handling. Before the fix, the system failed to properly validate URL schemes, allowing potentially malicious URLs to be processed. The vulnerability has been assigned a CVSS v3.1 base score of 4.8 (Medium) with the vector string CVSS:3.1/AV:N/AC:L/PR:H/UI:R/S:C/C:L/I:L/A:N. The weakness is classified as CWE-79 (Improper Neutralization of Input During Web Page Generation) (GitHub Advisory, NVD).

Impact

The vulnerability's exploitation could lead to several serious consequences: execution of arbitrary JavaScript code, potential theft of sensitive data through phishing attacks, and modification of the user interface behavior. While the impact is significant, it requires high privileges for exploitation (GitHub Advisory).

Mitigation and workarounds

The vulnerability has been fixed in version 1.20.1 of tarteaucitron.js. The fix implements strict URL validation ensuring that URLs only start with http:// or https:// before being used. The patch was implemented through commit 2fa1e01, which added security checks for URL attributes and disabled the data-srcdoc attribute to prevent XSS (GitHub Commit).

Additional resources


SourceThis report was generated using AI

Related JavaScript vulnerabilities:

CVE ID

Severity

Score

Technologies

Component name

CISA KEV exploit

Has fix

Published date

CVE-2025-66456CRITICAL9.1
  • JavaScriptJavaScript
  • elysia
NoYesDec 09, 2025
CVE-2025-66457HIGH7.5
  • JavaScriptJavaScript
  • elysia
NoYesDec 09, 2025
CVE-2025-65849MEDIUM6.9
  • JavaScriptJavaScript
  • altcha
NoNoDec 08, 2025
CVE-2025-66202MEDIUM6.5
  • JavaScriptJavaScript
  • astro
NoYesDec 09, 2025
CVE-2025-14284MEDIUM5.1
  • JavaScriptJavaScript
  • @tiptap/extension-link
NoYesDec 09, 2025

Free Vulnerability Assessment

Benchmark your Cloud Security Posture

Evaluate your cloud security practices across 9 security domains to benchmark your risk level and identify gaps in your defenses.

Request assessment

Get a personalized demo

Ready to see Wiz in action?

"Best User Experience I have ever seen, provides full visibility to cloud workloads."
David EstlickCISO
"Wiz provides a single pane of glass to see what is going on in our cloud environments."
Adam FletcherChief Security Officer
"We know that if Wiz identifies something as critical, it actually is."
Greg PoniatowskiHead of Threat and Vulnerability Management