Skip to main content
Vulnerability Database/CVE-2026-111714

CVE-2026-111714: tarteaucitron.js RegEx DOS Vulnerability

CVE-2026-111714 is a regular expression denial of service flaw in tarteaucitron.js before version 1.37.0 that enables attackers to freeze visitor pages. This post explains its impact, affected versions, and mitigation steps.

Published:

Disclaimer: This content was generated using AI. While we strive for accuracy, please verify critical information with official sources.

Sources: National Vulnerability Database, CISA KEV, Exploit-DB

CVE-2026-111714 Overview

CVE-2026-111714 is a regular expression denial of service (ReDoS) vulnerability in tarteaucitron.js versions before 1.37.0. The flaw resides in the cookie.purge function, which constructs a regular expression using unescaped cookie names supplied as input. Attackers can plant a cookie from a sibling subdomain or inject a purgeBtn element with a data-cookie attribute containing a catastrophic-backtracking pattern. When the purge button triggers, the crafted pattern freezes the visitor's browser page. The weakness is classified as CWE-1333: Inefficient Regular Expression Complexity.

Critical Impact

Browser-side denial of service that freezes visitor pages interacting with vulnerable tarteaucitron.js consent management deployments.

Affected Products

  • tarteaucitron.js cookie consent library versions prior to 1.37.0
  • Websites embedding the vulnerable tarteaucitron.js script for GDPR cookie consent
  • Deployments sharing cookie scope with untrusted sibling subdomains

Discovery Timeline

  • 2026-10-16 - CVE-2026-111714 published to NVD
  • 2026-10-21 - Last updated in NVD database

Technical Details for CVE-2026-111714

Vulnerability Analysis

The vulnerability stems from unsafe regular expression construction inside the cookie.purge routine of tarteaucitron.js. The function concatenates attacker-controllable cookie names directly into a RegExp pattern without escaping regex metacharacters. A malicious cookie name containing nested quantifiers produces catastrophic backtracking when matched against document.cookie. The browser's main thread blocks while the regex engine explores an exponential number of states. The result is a client-side denial of service that renders the page unresponsive.

Root Cause

The original implementation built the matching pattern as "^(.*;)?\\s*" + arr[i] + "\\s*=\\s*[^;]+(.*)?$". The leading (.*;)? and trailing (.*)?$ subpatterns combined with user-supplied input create ambiguous matching paths. Any cookie name containing crafted repetition operators triggers worst-case backtracking.

Attack Vector

Attackers deliver the malicious cookie name through two channels. First, a cookie set from a sibling subdomain propagates to the parent domain and lands in document.cookie. Second, markup injection into a page can introduce a purgeBtn element whose data-cookie attribute carries the hostile pattern. User interaction with the purge control is required to invoke the vulnerable regex.

javascript
// Patch from tarteaucitron.js commit 60faaba5fd541cad770549d422fc4ac7de657e56
// Before (vulnerable):
-rgxpCookie = new RegExp("^(.*;)?\\s*" + arr[i] + "\\s*=\\s*[^;]+(.*)?$");

// After (patched):
+rgxpCookie = new RegExp("(?:^|;\\s*)" + arr[i].replace(/[.*+?^${}()|[\]\\]/g, '\\$&') + "\\s*=");

// The fix escapes all regex metacharacters in the cookie name
// and replaces the ambiguous (.*;)? / (.*)?$ anchors with a
// deterministic (?:^|;\s*) alternation that eliminates backtracking.

Source: GitHub tarteaucitron.js Commit 60faaba

Detection Methods for CVE-2026-111714

Indicators of Compromise

  • Cookies present in document.cookie with names containing repeated regex metacharacters such as (a+)+, (.*)*, or long sequences of *, +, ?
  • Unexpected purgeBtn elements in page DOM with suspicious data-cookie attribute values
  • Browser telemetry reporting long-running synchronous JavaScript tasks on pages loading tarteaucitron.js versions earlier than 1.37.0

Detection Strategies

  • Inventory web properties for tarteaucitron.js script tags and verify the version attribute against 1.37.0 or later
  • Scan content security policy reports and client-side error logs for Unresponsive script warnings tied to consent management pages
  • Review subdomain cookie scopes and audit which hosts can set cookies on the parent domain

Monitoring Recommendations

  • Deploy real user monitoring (RUM) to flag long tasks exceeding 500 ms on consent banner interactions
  • Alert on client-side exceptions correlated with tarteaucitron script execution
  • Track EPSS score movement for CVE-2026-111714 (currently 0.218%) alongside library version adoption metrics

How to Mitigate CVE-2026-111714

Immediate Actions Required

  • Upgrade tarteaucitron.js to version 1.37.0 or later across all web properties
  • Audit cookie scopes and restrict which subdomains can set cookies on the parent domain
  • Remove or sanitize any dynamically generated purgeBtn elements rendered from untrusted input

Patch Information

The maintainers addressed the issue in tarteaucitron.js release v1.37.0. The fix escapes regex metacharacters in cookie names before constructing the matching pattern and simplifies the anchor expression to eliminate catastrophic backtracking. Technical details are documented in the VulnCheck Advisory on tarteaucitron.js and the upstream source code reference.

Workarounds

  • If immediate upgrade is not feasible, disable or remove the cookie.purge code path from the deployed script
  • Enforce strict Set-Cookie policies and avoid wildcard parent-domain cookies that permit sibling subdomain injection
  • Validate any user-controllable data-cookie attribute values against an allowlist of safe cookie name characters before rendering
bash
# Verify installed tarteaucitron.js version via npm
npm list tarteaucitron.js

# Upgrade to the patched release
npm install tarteaucitron.js@^1.37.0

# Confirm the fix is present in the vendored file
grep -n "replace(/\[\.\*+?" node_modules/tarteaucitron.js/tarteaucitron.js

Disclaimer: This content was generated using AI. While we strive for accuracy, please verify critical information with official sources.

Sources: National Vulnerability Database, CISA KEV, Exploit-DB

Experience the Most Advanced Cybersecurity Platform

See how the world’s most intelligent, autonomous cybersecurity platform can protect your organization today and into the future.