CVE-2026-49977
tarteaucitron.js: data-cookie attribute can be used to delete arbitrary cookies
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.
Attack profile
How easy it is to exploit
- Attack vector
- Network
- Complexity
- Low
- Privileges needed
- None
- User interaction
- Required
What an attacker can affect
- Confidentiality
- None
- Integrity
- Low
- Availability
- None
Exploit likelihood
What each source reports
CVE List Score used
4.3
tarteaucitron.js: data-cookie attribute can be used to delete arbitrary cookies
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.
- Record
CVE-2026-49977- CVSS 3.1
- 4.3 Medium
CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:U/C:N/I:L/A:N - Weakness
- CWE-285
- Updated
- 2026-11-02
EUVDEUVD-2026-45318
4.3
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.
- Record
EUVD-2026-45318- CVSS 3.1
- 4.3 Medium
CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:U/C:N/I:L/A:N - Updated
- 2026-11-02
GitHub AdvisoriesGHSA-jxj7-g6gm-49j7
4.3
tarteaucitron: data-cookie attribute can be used to delete arbitrary cookies
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
<a class="purgeBtn" data-cookie="foo">Click me!</a>
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.
- Record
GHSA-jxj7-g6gm-49j7- CVSS 3.1
- 4.3 Medium
CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:U/C:N/I:L/A:N - Weakness
- CWE-285
- Updated
- 2026-11-02
NVD
4.3
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.
- Record
CVE-2026-49977- CVSS 3.1
- 4.3 Medium
CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:U/C:N/I:L/A:N - Weakness
- CWE-285
- Updated
- 2026-11-02
OSV
4.3
tarteaucitron.js: data-cookie attribute can be used to delete arbitrary cookies
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.
- Record
CVE-2026-49977- CVSS 3.1
- 4.3 Medium
CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:U/C:N/I:L/A:N - Weakness
- CWE-285
- Updated
- 2026-11-02
OSVGHSA-jxj7-g6gm-49j7
4.3
tarteaucitron: data-cookie attribute can be used to delete arbitrary cookies
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
<a class="purgeBtn" data-cookie="foo">Click me!</a>
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.
- Record
GHSA-jxj7-g6gm-49j7- CVSS 3.1
- 4.3 Medium
CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:U/C:N/I:L/A:N - Weakness
- CWE-285
- Updated
- 2026-11-02
OSVDRUPAL-CONTRIB-2026-040 No score
This module enables sites to comply with the European cookie law using tarteaucitron.js.
The module doesn't sufficiently filter user-supplied markup inside of content leading to an attacker being able to delete arbitrary cookies.
This vulnerability is mitigated by the fact that an attacker needs to be able to insert specific data attributes in the page.
For additional information, see the Github Security Advisory GHSA-jxj7-g6gm-49j7 for the tarteaucitron.js library.
- Record
DRUPAL-CONTRIB-2026-040- Updated
- 2026-11-02
Affected products
Affected packages
| Package | Affected | Fixed |
|---|---|---|
tarteaucitronjsnpm |
before 1.33.0 | 1.33.0 |
drupal/tacjsPackagist:https://packages.drupal.org/8 |
before 6.8.0 | 6.8.0 |
History
| Recorded | Changed | Sources |
|---|---|---|
| aliases | EUVD | |
| first indexed | CVE List, GitHub Advisories, NVD, OSV |
Dates are when Every CVE recorded each change. Upstream dates may differ.
In short
CVE-2026-49977 is a medium vulnerability (CVSS 4.3) in Amauric Tarteaucitron.js, published June 3, 2026. No source lists public exploit code. EPSS puts the chance of exploitation in the next 30 days at 0.35%, the 29th percentile. Fixed in tarteaucitronjs 1.33.0.
References
github.com/AmauriC/tarteaucitron.js/security/advisories/GHSA-jxj7-g6gm-49j7
github.com/AmauriC/tarteaucitron.js/commit/24b5464400ae2ff1ad96a092c629b9d632b9cc93
github.com/AmauriC/tarteaucitron.js/releases/tag/v1.33.0
drupal.org/sa-contrib-2026-040
github.com/advisories/GHSA-jxj7-g6gm-49j7
github.com/CVEProject/cvelistV5/tree/main/cves/2026/49xxx/CVE-2026-49977.json
nvd.nist.gov/vuln/detail/CVE-2026-49977
github.com/AmauriC/tarteaucitron.js