{"id":"CVE-2026-49977","aliases":["CVE-2026-49977","GHSA-jxj7-g6gm-49j7","DRUPAL-CONTRIB-2026-040"],"related":[],"kind":"vulnerability","state":"published","title":"tarteaucitron.js: data-cookie attribute can be used to delete arbitrary cookies","summary":"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.","summarySource":"cvelist","descriptions":[{"lang":"en","text":"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.","source":"cvelist"},{"lang":"en","text":"### Summary\n\ntarteaucitron 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.\n\n### Details\n\n`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.\n\n### PoC\n\n```html\n<a class=\"purgeBtn\" data-cookie=\"foo\">Click me!</a>\n```\n\nIf someone has a cookie with this name and clicks on the link, the cookie is silently deleted.\n\n### Impact\n\nThe impact is limited because this only works on cookies without HttpOnly=true and the attacker has to know the name of the cookie.","format":"markdown","source":"ghsa"},{"lang":"en","text":"This module enables sites to comply with the European cookie law using tarteaucitron.js.\n\nThe module doesn't sufficiently filter user-supplied markup inside of content leading to an attacker being able to delete arbitrary cookies.\n\nThis vulnerability is mitigated by the fact that an attacker needs to be able to insert specific data attributes in the page.\n\nFor additional information, see the [Github Security Advisory GHSA-jxj7-g6gm-49j7](https://github.com/AmauriC/tarteaucitron.js/security/advisories/GHSA-jxj7-g6gm-49j7) for the tarteaucitron.js library.","format":"markdown","source":"drupal"},{"lang":"es","text":"tarteaucitron.js es un banner de cookies conforme y accesible. Antes de 1.33.0, tarteaucitron.cookie.purge() se llama en cualquier elemento con la clase purgeBtn y no verifica si el elemento es un botón legítimo de tarteaucitron o si la cookie corresponde a un servicio gestionado por tarteaucitron. Si un atacante puede escribir HTML con atributos de datos, un elemento con data-cookie puede eliminar silenciosamente una cookie no HttpOnly con un nombre conocido cuando un usuario hace clic en él. Este problema está solucionado en la versión 1.33.0.","source":"nvd"}],"published":"2026-06-03T16:11:51.000Z","modified":"2026-11-17T18:55:46.292Z","severity":{"scorer":"GitHub_M","scheme":"CVSS:3.1","vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:U/C:N/I:L/A:N","score":4.3,"rating":"MEDIUM"},"severities":[{"scorer":"GitHub_M","scheme":"CVSS:3.1","vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:U/C:N/I:L/A:N","score":4.3,"rating":"MEDIUM"},{"scorer":"GitHub","scheme":"CVSS:3.1","vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:U/C:N/I:L/A:N","score":4.3,"rating":"MEDIUM"}],"cwes":["CWE-285"],"affected":[{"ranges":[{"version":"< 1.33.0","status":"affected"}],"vendor":"AmauriC","product":"tarteaucitron.js","source":"cvelist"},{"ranges":[{"type":"semver","introduced":"0","status":"affected","fixed":"1.33.0"}],"ecosystem":"npm","package":"tarteaucitronjs","purl":"pkg:npm/tarteaucitronjs","source":"ghsa"},{"ranges":[{"type":"ecosystem","introduced":"0","status":"affected","fixed":"6.8.0"}],"ecosystem":"Packagist:https://packages.drupal.org/8","package":"drupal/tacjs","purl":"pkg:composer/drupal/tacjs?repository_url=https:%2F%2Fpackages.drupal.org%2F8","source":"drupal"}],"references":[{"url":"https://github.com/AmauriC/tarteaucitron.js/security/advisories/GHSA-jxj7-g6gm-49j7","tags":["web","x-refsource-confirm"],"sources":["cvelist","ghsa","nvd"]},{"url":"https://github.com/AmauriC/tarteaucitron.js/commit/24b5464400ae2ff1ad96a092c629b9d632b9cc93","tags":["x-refsource-misc"],"sources":["cvelist","nvd"]},{"url":"https://github.com/AmauriC/tarteaucitron.js/releases/tag/v1.33.0","tags":["x-refsource-misc"],"sources":["cvelist","nvd"]},{"url":"https://www.drupal.org/sa-contrib-2026-040","tags":["web"],"sources":["cvelist","drupal","nvd"]},{"url":"https://github.com/AmauriC/tarteaucitron.js","tags":["package"],"sources":["ghsa"]}],"credits":["Frank Mably (mably)","Pierre Rudloff (prudloff)"],"assigner":"GitHub_M","ssvc":{"scorer":"CISA-ADP","exploitation":"none","automatable":"no","technicalImpact":"partial","date":"2026-07-20T18:51:55.083Z"},"sources":[{"source":"cvelist","name":"CVE List","id":"CVE-2026-49977","url":"https://www.cve.org/CVERecord?id=CVE-2026-49977","licence":"CVE Terms of Use","modified":"2026-07-20T19:11:28.659Z"},{"source":"ghsa","name":"GitHub Advisory Database","id":"GHSA-jxj7-g6gm-49j7","url":"https://github.com/advisories/GHSA-jxj7-g6gm-49j7","licence":"CC-BY-4.0","modified":"2026-11-17T18:55:46.292Z"},{"source":"drupal","name":"Drupal Security Team","id":"DRUPAL-CONTRIB-2026-040","url":"https://osv.dev/vulnerability/DRUPAL-CONTRIB-2026-040","licence":"MIT","modified":"2026-11-17T18:55:46.292Z"},{"source":"nvd","name":"NVD","id":"CVE-2026-49977","url":"https://nvd.nist.gov/vuln/detail/CVE-2026-49977","licence":"Public domain","modified":"2026-10-24T20:10:00.137Z"}],"updatedAt":"2026-11-25T22:59:28.569Z","epss":{"score":0.002,"percentile":0.10403,"date":"2026-12-01T12:00:22.000Z"}}