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-111713 Overview
CVE-2026-111713 is a cross-site scripting (XSS) vulnerability in tarteaucitron.js versions before 1.37.0. The flaw lives in the getElemAttr helper, which resolves data- prefixed attributes while the HTTPS-only guard validates the unprefixed attribute. Attackers who can place markup, such as content management system (CMS) authors, can add a data-url with a javascript: URL beside a benign url to execute script in the site's origin via an iframesrc. The weakness is classified under CWE-79.
Critical Impact
Authenticated content authors can inject arbitrary JavaScript that executes in the hosting site's origin, enabling session theft, defacement, and user compromise.
Affected Products
- tarteaucitron.js versions prior to 1.37.0
- Websites embedding the tarteaucitron.js consent management library
- CMS deployments that let untrusted authors inject tag attributes into pages using tarteaucitron.js
Discovery Timeline
- 2026-10-16 - CVE-2026-111713 published to the National Vulnerability Database (NVD)
- 2026-10-20 - Last updated in NVD database
Technical Details for CVE-2026-111713
Vulnerability Analysis
The vulnerability stems from an attribute validation mismatch inside getElemAttr. The function reads an attribute by first attempting the data- prefixed version, falling back to the unprefixed form. The HTTPS-only guard, however, calls elem.getAttribute(attr) directly on the unprefixed name when checking the URL scheme.
An attacker who can supply both a benign url="https://example.com" and a malicious data-url="javascript:..." passes the guard. The resolver then returns the data-url value and hands it to an iframesrc, triggering script execution in the site's origin.
Exploitation requires an attacker with low privileges to post markup on the target site, such as a CMS author or forum contributor. User interaction is required to render the affected page.
Root Cause
The root cause is inconsistent attribute resolution between the data lookup and the security guard. The resolver prefers data- prefixed attributes, while the regex-based HTTPS validator ignores the prefix and inspects a different attribute slot. This separation of logic lets a safe attribute pass validation while an unsafe one supplies the final value used downstream.
Attack Vector
The attack vector is network-based through content injection. A low-privileged author places markup containing paired attributes on a page served by a site using tarteaucitron.js. When a visitor loads that page, the library builds an iframe whose src is set to the attacker-controlled javascript: URL. The script executes in the site's origin, with full access to cookies, local storage, and the DOM.
// Patch from tarteaucitron.js commit 068653b
var attribute = elem.getAttribute('data-' + attr) || elem.getAttribute(attr) || elem.getAttribute(attr.startsWith('data-') ? attr.slice(5) : attr);
// security: only allow real url on the url attr
- if ((attr === 'url' || attr === 'data-url' || attr === 'data-src') && !/^https?:\/\/[^\s]+$/.test(elem.getAttribute(attr))) {
+ if ((attr === 'url' || attr === 'data-url' || attr === 'data-src') && !/^https?:\/\/[^\s]+$/.test(attribute)) {
return "";
}
Source: GitHub Commit 068653b. The fix validates the already-resolved attribute variable rather than re-reading the unprefixed attribute from the element.
Detection Methods for CVE-2026-111713
Indicators of Compromise
- Page markup that contains both a url and a data-url attribute on the same tag targeted by tarteaucitron.js.
- Attribute values beginning with javascript:, data:text/html, or other non-http(s) schemes on tags consumed by the consent library.
- Rendered iframe elements whose src attribute does not match ^https?://.
Detection Strategies
- Scan the CMS content store and page templates for data-url or data-src attributes whose values do not begin with http:// or https://.
- Inspect the deployed tarteaucitron.js file and confirm the version is 1.37.0 or later; versions below 1.37.0 are vulnerable.
- Add a Content Security Policy (CSP) report-only header and watch for frame-src and script-src violations that originate from embedded iframe payloads.
Monitoring Recommendations
- Log client-side CSP violation reports and alert on javascript: URL blocks from pages that embed consent widgets.
- Monitor web application firewall (WAF) telemetry for POST requests that submit CMS content containing data-url="javascript: or similar paired attribute patterns.
- Track outbound requests from browsers to unexpected domains shortly after a user visits pages using tarteaucitron.js.
How to Mitigate CVE-2026-111713
Immediate Actions Required
- Upgrade tarteaucitron.js to version 1.37.0 or later across all sites and CDN-hosted copies.
- Audit CMS-stored content for existing data-url, data-src, and url attributes carrying non-HTTP schemes and remove them.
- Restrict CMS authoring roles so that only trusted users can insert raw HTML or tag attributes into published pages.
Patch Information
The maintainer fixed the issue in tarteaucitron.js release v1.37.0. The corrective commit is 068653b, which changes the HTTPS guard to validate the resolved attribute value. See the GitHub v1.36.0 to v1.37.0 diff and the VulnCheck Security Advisory for additional context.
Workarounds
- Deploy a strict CSP with frame-src https: and script-src 'self' to block javascript: URLs in iframesrc.
- Sanitize author-supplied markup server-side to strip data-url, data-src, and url attributes whose values are not HTTP(S) URLs.
- Apply a monkey-patch on getElemAttr that re-validates the resolved attribute value before returning when upgrading is not immediately possible.
# Example: enforce HTTPS-only iframes via a response header
add_header Content-Security-Policy "default-src 'self'; frame-src https:; script-src 'self'; object-src 'none'" always;
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

