GHSA-jxj7-g6gm-49j7: tarteaucitron: data-cookie attribute can be used to delete arbitrary cookies
tarteaucitronjs versions prior to 1.33.0 contain a vulnerability where an attacker who can inject HTML with data attributes can create elements that delete arbitrary cookies when clicked. This occurs because the purge function does not verify if the element is a legitimate button or if the cookie belongs to a managed service. The impact is limited to cookies without the HttpOnly flag and requires the attacker to know the cookie name.
AI Analysis
Technical Summary
The vulnerability in tarteaucitronjs (CVE-2026-49977) allows an attacker capable of injecting HTML with data attributes to create elements with the 'purgeBtn' class and a 'data-cookie' attribute. When a user clicks such an element, the tarteaucitron.cookie.purge() function deletes the specified cookie without verifying the legitimacy of the element or the cookie's association with tarteaucitron. This can lead to silent deletion of arbitrary cookies that are not marked HttpOnly, provided the attacker knows the cookie name. The affected versions are all tarteaucitronjs versions before 1.33.0.
Potential Impact
An attacker can cause users to unknowingly delete arbitrary cookies by tricking them into clicking crafted elements. This only affects cookies that are accessible via JavaScript (i.e., not HttpOnly) and requires knowledge of the cookie name. There is no direct confidentiality or availability impact, but integrity is affected by unauthorized cookie deletion.
Mitigation Recommendations
Patch status is not yet confirmed — check the vendor advisory for current remediation guidance. Until a fix is available, restrict the ability of untrusted users to inject HTML with data attributes in contexts where tarteaucitronjs is used. Consider setting sensitive cookies with the HttpOnly flag to prevent deletion via this method.
GHSA-jxj7-g6gm-49j7: tarteaucitron: data-cookie attribute can be used to delete arbitrary cookies
Description
tarteaucitronjs versions prior to 1.33.0 contain a vulnerability where an attacker who can inject HTML with data attributes can create elements that delete arbitrary cookies when clicked. This occurs because the purge function does not verify if the element is a legitimate button or if the cookie belongs to a managed service. The impact is limited to cookies without the HttpOnly flag and requires the attacker to know the cookie name.
CVSS v3.1
Affected software
Run on your own infrastructure? Check whether these packages are installed with threat-finder — our free open-source scanner.
Weaknesses
AI-Powered Analysis
Machine-generated threat intelligence
Technical Analysis
The vulnerability in tarteaucitronjs (CVE-2026-49977) allows an attacker capable of injecting HTML with data attributes to create elements with the 'purgeBtn' class and a 'data-cookie' attribute. When a user clicks such an element, the tarteaucitron.cookie.purge() function deletes the specified cookie without verifying the legitimacy of the element or the cookie's association with tarteaucitron. This can lead to silent deletion of arbitrary cookies that are not marked HttpOnly, provided the attacker knows the cookie name. The affected versions are all tarteaucitronjs versions before 1.33.0.
Potential Impact
An attacker can cause users to unknowingly delete arbitrary cookies by tricking them into clicking crafted elements. This only affects cookies that are accessible via JavaScript (i.e., not HttpOnly) and requires knowledge of the cookie name. There is no direct confidentiality or availability impact, but integrity is affected by unauthorized cookie deletion.
Mitigation Recommendations
Patch status is not yet confirmed — check the vendor advisory for current remediation guidance. Until a fix is available, restrict the ability of untrusted users to inject HTML with data attributes in contexts where tarteaucitronjs is used. Consider setting sensitive cookies with the HttpOnly flag to prevent deletion via this method.
Technical Details
- Gcve Source
- db.gcve.eu
- Osv Id
- GHSA-jxj7-g6gm-49j7
- Osv Schema Version
- 1.4.0
- Aliases
- ["CVE-2026-49977"]
- Ecosystems
- ["npm"]
- Database Specific Severity
- MODERATE
- Cvss Version
- 3.1
Threat ID: 6a520ee368715ace4391aa7f
Added to database: 07/11/2026, 09:37:39 UTC
Last enriched: 07/11/2026, 10:06:16 UTC
Last updated: 07/11/2026, 10:06:16 UTC
Views: 2
Community Reviews
0 reviewsCrowdsource mitigation strategies, share intel context, and vote on the most helpful responses. Sign in to add your voice and help keep defenders ahead.
Want to contribute mitigation steps or threat intel context? Sign in or create an account to join the community discussion.
Actions
Updates to AI analysis require Pro Console access. Upgrade inside Console → Billing.
Need more coverage?
Upgrade to Pro Console for AI refresh and higher limits.
For incident response and remediation, OffSeq services can help resolve threats faster.
Latest Threats
Check if your credentials are on the dark web
Instant breach scanning across billions of leaked records. Free tier available.