# CVE-2026-49977: AmauriC tarteaucitron.js unauthorized cookie deletion via data-cookie attribute

Source: https://junglewise.ai/threats/cve-2026-49977-amauric-tarteaucitron-js-unauthorized-cookie-deletion-via-data  
Publisher: Junglewise Threat Intelligence, https://junglewise.ai/threats  
Published: 2026-07-17. Updated: 2026-07-17  
License: CC BY 4.0 with a link back

CVE-2026-49977 · Severity: medium · CVSS 4.3 · Published 2026-07-17

tarteaucitron.js is a popular tool used by websites to manage cookie consent and comply with privacy laws. A security flaw allows an attacker who can post content on a site (such as in a comment or profile) to create a hidden trigger that deletes a visitor's cookies when they click a specific link. This could be used to disrupt user sessions or clear preferences, though it cannot be used to steal sensitive data protected by standard browser security settings.

Technologies: [AmauriC Tarteaucitron.Js](https://junglewise.ai/threats/technologies/tarteaucitron-js), [tarteaucitronjs (npm)](https://junglewise.ai/threats/technologies/tarteaucitronjs). Vendors: [AmauriC](https://junglewise.ai/threats/vendors/amauric), [Drupal](https://junglewise.ai/threats/vendors/drupal), [npm](https://junglewise.ai/threats/vendors/npm).

## Quick answers

**Is CVE-2026-49977 exploited in the wild?** No. Junglewise Threat Intelligence has no report of CVE-2026-49977 being exploited in the wild.

**How severe is CVE-2026-49977?** Medium severity, with a CVSS score of 4.3, published 17 July 2026.

**Which products and versions are affected?** AmauriC Tarteaucitron.Js < 1.33.0; Drupal TacJS < 8.x-6.8; tarteaucitronjs (npm) < 1.33.0, SEMVER:introduced=0,fixed=1.33.0.

**Is there a fix for CVE-2026-49977?** Yes. tarteaucitronjs (npm): upgrade to 1.33.0 or later. Junglewise finds every place you run it, drafts the upgrade and applies it once you approve.

**How is CVE-2026-49977 attacked?** It is attacked over the network, in a software library.

**Am I affected by CVE-2026-49977?** Check whether you run AmauriC Tarteaucitron.Js, Drupal TacJS or tarteaucitronjs (npm) at an affected version. Junglewise does that check for you around the clock: connect your code, cloud and domains, and it matches new vulnerabilities like this one against what you actually run and tells you when one reaches you.

## How to fix

- tarteaucitronjs (npm): upgrade to 1.33.0 or later

  ```sh
  npm install tarteaucitronjs@1.33.0
  ```


## Technical details

An improper authorization vulnerability (CWE-285) exists in tarteaucitron.js due to insufficient validation in the cookie purging mechanism. The `tarteaucitron.cookie.purge()` function is triggered by any HTML element assigned the `purgeBtn` class without verifying if the element is a legitimate part of the library's UI. If an attacker can inject HTML with data attributes (e.g., via a CMS or comment section), they can use the `data-cookie` attribute to specify a cookie name for deletion. When a user clicks the malicious element, the specified non-HttpOnly cookie is deleted. This issue is fixed in tarteaucitron.js version 1.33.0 and Drupal TacJS version 8.x-6.8.

## Affected products

- AmauriC tarteaucitron.js < 1.33.0
- Drupal TacJS < 8.x-6.8

## Identifiers

- CVE-2026-49977
- GHSA-jxj7-g6gm-49j7

## Timeline

- 2026-05-27: patched: tarteaucitron.js version 1.33.0 released
- 2026-06-03: advisory: GitHub Security Advisory and Drupal SA-CONTRIB-2026-040 published
- 2026-07-17: disclosed: CVE-2026-49977 published to NVD

## References

- [https://github.com/AmauriC/tarteaucitron.js/commit/24b5464400ae2ff1ad96a092c629b9d632b9cc93](https://github.com/AmauriC/tarteaucitron.js/commit/24b5464400ae2ff1ad96a092c629b9d632b9cc93)
- [https://github.com/AmauriC/tarteaucitron.js/releases/tag/v1.33.0](https://github.com/AmauriC/tarteaucitron.js/releases/tag/v1.33.0)
- [https://github.com/AmauriC/tarteaucitron.js/security/advisories/GHSA-jxj7-g6gm-49j7](https://github.com/AmauriC/tarteaucitron.js/security/advisories/GHSA-jxj7-g6gm-49j7)
- [https://www.drupal.org/sa-contrib-2026-040](https://www.drupal.org/sa-contrib-2026-040)

## Related threats

- [tarteaucitron.js Regular Expression Denial of Service](https://junglewise.ai/threats/cve-2026-22809-tarteaucitron-js-regular-expression-denial-of-service)
- [tarteaucitron.js DOM Clobbering via document.currentScript](https://junglewise.ai/threats/cve-2025-48939-tarteaucitron-js-dom-clobbering-via-document-currentscript)
- [tarteaucitron.js prototype pollution in custom text injection](https://junglewise.ai/threats/cve-2025-31475-tarteaucitron-js-prototype-pollution-in-custom-text-injection)
- [tarteaucitron.js CSS injection enabling UI manipulation](https://junglewise.ai/threats/cve-2025-31138-tarteaucitron-js-css-injection-enabling-ui-manipulation)
- [tarteaucitron.js URL scheme injection via unfiltered inputs](https://junglewise.ai/threats/cve-2025-31476-tarteaucitron-js-url-scheme-injection-via-unfiltered-inputs)
