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

> Archived entry. Full-text search covers entries since 2026-11-10; exact IDs work for all years.

- **Severity:** MEDIUM 4.3
- **CVSS:** 4.3 (v3.1, CNA) `CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:U/C:N/I:L/A:N`
- **CVSS metrics:** Attack vector: Network; Attack complexity: Low; Privileges required: None; User interaction: Required; Scope: Unchanged; Confidentiality impact: None; Integrity impact: Low; Availability impact: None
- **Exploited in the wild:** Not in CISA KEV
- **Public exploit / PoC:** None known
- **Remote exploitation:** Remote, no login needed
- **EPSS:** 0.35% (percentile 21, 2026-11-26)
- **CWE:** CWE-285
- **Aliases:** DRUPAL-CONTRIB-2026-040, GHSA-jxj7-g6gm-49j7
- **Published:** 2026-06-03T16:11:51.000Z
- **Modified:** 2026-11-17T18:55:46.292Z

## Who should check

- Projects that depend on npm package tarteaucitronjs (\< 1.33.0)
- Projects that depend on Packagist package drupal/tacjs (\< 6.8.0)
- Anyone running AmauriC tarteaucitron.js \< 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.

## Affected and fixed versions

- npm `tarteaucitronjs`: affected \< 1.33.0; fixed 1.33.0 (osv)
- Packagist `drupal/tacjs`: affected \< 6.8.0; fixed 6.8.0 (osv)
- AmauriC tarteaucitron.js: \< 1.33.0 (cvelist)

## Mitigation

- Upgrade tarteaucitronjs to 1.33.0 or later.
- Upgrade drupal/tacjs to 6.8.0 or later.

## Check your systems with an agent

Paste this into a coding agent:

```text
Check whether anything I run is affected by CVE-2026-49977. Work read-only: do not install, upgrade, delete or change anything.

Details: https://flawdb.com/CVE-2026-49977.md
Affected: tarteaucitronjs < 1.33.0; drupal/tacjs < 6.8.0
Fixed in: 1.33.0, 6.8.0

Steps:
1. Search this machine and project for tarteaucitronjs (npm), drupal/tacjs (Packagist), AmauriC tarteaucitron.js: dependency manifests and lockfiles, installed packages, container images and running services.
2. For each match, note the installed version and whether it is inside the affected range.
3. Report a table: location, installed version, affected (yes / no / unsure), evidence. If affected, say which fixed version or mitigation from the details link applies, but don't apply it.
```

## FAQ

### Is CVE-2026-49977 being exploited?

There is no confirmed exploitation: CVE-2026-49977 is not in the CISA Known Exploited Vulnerabilities catalog. No public exploit code is known. EPSS estimates a 0.35% chance of exploitation in the next 30 days (as of 2026-11-26).

### How serious is CVE-2026-49977?

Medium: CVSS 4.3 (v3.1, scored by CNA). Remote, no login needed. A user has to take an action, such as opening a link, for the attack to work.

### Which versions are affected by CVE-2026-49977?

tarteaucitronjs \< 1.33.0; drupal/tacjs \< 6.8.0.

### Is there a fix for CVE-2026-49977?

Yes. Fixed in 1.33.0, 6.8.0. Upgrade tarteaucitronjs to 1.33.0 or later. Upgrade drupal/tacjs to 6.8.0 or later.

### How do I check if I'm affected by CVE-2026-49977?

Find where you use the affected software (dependency lockfiles, installed packages, container images, servers) and compare the installed version with the affected range above. The agent prompt on this page does this read-only.

## References

- vendor: <https://github.com/AmauriC/tarteaucitron.js/security/advisories/GHSA-jxj7-g6gm-49j7>
- patch: <https://github.com/AmauriC/tarteaucitron.js/commit/24b5464400ae2ff1ad96a092c629b9d632b9cc93>
- other: <https://github.com/AmauriC/tarteaucitron.js/releases/tag/v1.33.0>
- other: <https://www.drupal.org/sa-contrib-2026-040>
- other: <https://github.com/AmauriC/tarteaucitron.js>

## Attribution

- CVE Program: CVE® is a registered trademark of The MITRE Corporation. CVE records © 1999–2026 The MITRE Corporation. <https://www.cve.org/Legal/TermsOfUse>
- NVD: This product uses data from the NVD API but is not endorsed or certified by the NVD. <https://nvd.nist.gov/vuln/detail/CVE-2026-49977>
- OSV: CC-BY 4.0 <https://osv.dev/vulnerability/GHSA-jxj7-g6gm-49j7> (license: <https://creativecommons.org/licenses/by/4.0/>)
- OSV: CC-BY 4.0 <https://osv.dev/vulnerability/DRUPAL-CONTRIB-2026-040> (license: <https://creativecommons.org/licenses/by/4.0/>)

HTML: <https://flawdb.com/CVE-2026-49977> · JSON: <https://flawdb.com/api/v1/entries/CVE-2026-49977>
