GitHub Advisoryadvisory · npm

GHSA-jxj7-g6gm-49j7 tarteaucitron: data-cookie attribute can be used to delete arbitrary cookies

MEDIUM Published 2026-07-10 Modified 2026-07-10 Official page ↗
Aliases
CVE-2026-49977
Ecosystem
npm
Packages
tarteaucitronjs
Severity
Moderate
CVSS vector
CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:U/C:N/I:L/A:N
Weaknesses
CWE-285
Reviewed
2026-07-10

Affected packages

• npm tarteaucitronjs: < 1.33.0 → fixed in 1.33.0

Description

Summary tarteaucitron provides a list of cookies and buttons to delete them. If an attacker can write HTML with data attributes, they could create an element that silently deletes a cookie when clicked and trick a user to delete this cookie. Details `tarteaucitron.cookie.purge()` is called on any element with the `purgeBtn` class. It does not check if the element is a legitimate tarteaucitron button or if the cookie corresponds to a service handled by tarteaucitron. PoC ```html Click me! ``` If someone has a cookie with this name and clicks on the link, the cookie is silently deleted. Impact The impact is limited because this only works on cookies without HttpOnly=true and the attacker has to know the name of the cookie.

Related

Alias · CVE (1)

  • CVE-2026-49977 tarteaucitron.js is a compliant and accessible cookie banner. vulnerability

Weakness · CWE (1)

  • CWE-285 Improper Authorization weakness

References