---
id: "CVE-2026-111713"
kind: "vulnerability"
aliases: ["CVE-2026-111713"]
title: "tarteaucitron.js: cookie-consent script lets markup inject javascript: URLs"
severity: "medium"
cvss: 5.4
epss: null
exploited: false
status: "open"
category: "package"
products: []
ecosystems: []
tags: ["cms", "cookie-consent", "javascript", "package", "self-hosted"]
not_affected_if: ["library-not-used", "static-content-only", "version-1.37.0-or-later"]
published_at: "2026-10-16T18:17:55+00:00"
first_seen_at: "2026-10-23T21:57:13+00:00"
updated_at: "2026-10-25T04:18:17+00:00"
sources: [{"source": "nvd", "url": "https://nvd.nist.gov/vuln/detail/CVE-2026-111713", "first_seen_at": "2026-10-23T21:57:13+00:00"}]
---

# tarteaucitron.js: cookie-consent script lets markup inject javascript: URLs

tarteaucitron.js before 1.37.0 checks the https-only rule on a plain attribute but reads the data-prefixed one, so a javascript: URL slips through. An attacker who can place markup on the page, such as a CMS author, can run script in the site's origin via an iframe src.

_Summary, check and fix written by a model from the sources; labelled as such._

## How to check

- Look for `tarteaucitron.js` in the site's `package.json` or loaded script tags and read its version; anything below `1.37.0` is exposed
- Check whether users or content authors can insert raw HTML containing `data-url` attributes into pages that load the library

## Fix

- Upgrade tarteaucitron.js to `1.37.0` or later
- Until upgraded, restrict who can publish raw HTML on pages that load the consent script

## Timeline

- 2026-10-23T21:57:13+00:00 nvd https://nvd.nist.gov/vuln/detail/CVE-2026-111713

## From the sources

tarteaucitron.js before 1.37.0 contains a cross-site scripting vulnerability because getElemAttr resolves 'data-' prefixed attributes while the https-only guard validates the unprefixed attribute. Attackers who can place markup, such as CMS authors, can add data-url with a javascript: URL beside a benign url to execute script in the site's origin via iframe src.

---

_Free to read at a human pace. An API with keys and an MCP server are in preparation; early access: hello@infrastack.ai_
