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

- Severity: Medium 4.3 (CVSS:3.1, scored by GitHub_M) `CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:U/C:N/I:L/A:N`
- Known to be exploited: not in CISA's catalogue, which lists only what CISA has confirmed
- Likelihood of exploitation in the next 30 days (EPSS): 0.20%, higher than 10% of CVEs (2026-12-01)
- Published: 2026-06-03T16:11:51.000Z
- Modified: 2026-11-17T18:55:46.292Z
- Also known as: GHSA-jxj7-g6gm-49j7, DRUPAL-CONTRIB-2026-040
- Weaknesses: CWE-285
- SSVC (CISA-ADP): exploitation none, automatable no, technical impact partial
- Assigned by: GitHub_M

## 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.

(As written by CVE List.)

## Affected

- AmauriC tarteaucitron.js: < 1.33.0
- tarteaucitronjs (npm): before 1.33.0
- drupal/tacjs (Packagist:https://packages.drupal.org/8): before 6.8.0

## Every score

- GitHub_M: 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`
- GitHub: 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`

## References

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

## Sources

- CVE List: [CVE-2026-49977](https://www.cve.org/CVERecord?id=CVE-2026-49977), CVE Terms of Use, modified 2026-07-20
- GitHub Advisory Database: [GHSA-jxj7-g6gm-49j7](https://github.com/advisories/GHSA-jxj7-g6gm-49j7), CC-BY-4.0, modified 2026-11-17
- Drupal Security Team: [DRUPAL-CONTRIB-2026-040](https://osv.dev/vulnerability/DRUPAL-CONTRIB-2026-040), MIT, modified 2026-11-17
- NVD: [CVE-2026-49977](https://nvd.nist.gov/vuln/detail/CVE-2026-49977), Public domain, modified 2026-10-24

---

Page: https://cve.day/CVE-2026-49977 · Whole record: https://cve.day/CVE-2026-49977.json · Rebuilt by cve.day 2026-11-25T22:59:28.569Z
