Tarteaucitronjs: tarteaucitron: data-cookie attribute can be used to delete arbitrary cookies (CVE-2026-49977)
tarteaucitronjs versions prior to 1.33.0 contain a vulnerability where an attacker able to inject HTML with data attributes can create elements that delete arbitrary cookies when clicked. This occurs because the purge function does not verify the legitimacy of the element or ownership of the cookie. Exploitation requires user interaction and knowledge of the cookie name. The impact is limited to cookies without the HttpOnly flag.
AI Analysis
Technical Summary
In tarteaucitronjs versions before 1.33.0, the purge function responsible for deleting cookies does not validate whether the triggering element is a legitimate control or if the cookie targeted belongs to a managed service. An attacker who can inject HTML with data-cookie attributes can craft elements that, when clicked by a user, delete arbitrary cookies. This vulnerability requires user interaction and knowledge of the cookie name. Cookies flagged as HttpOnly are not affected. There is no indication of known exploits in the wild and no official patch information is provided.
Potential Impact
An attacker with the ability to inject HTML and knowledge of cookie names can cause users to delete arbitrary cookies that are not protected by the HttpOnly flag. This could disrupt user sessions or application functionality relying on such cookies. The vulnerability does not allow direct cookie theft or modification, and requires user interaction, limiting its severity.
Mitigation Recommendations
Patch status is not yet confirmed — check the vendor advisory for current remediation guidance. Until a fix is available, restrict or sanitize user-supplied HTML to prevent injection of elements with data-cookie attributes. Consider setting sensitive cookies with the HttpOnly flag to prevent deletion via this method.
Tarteaucitronjs: tarteaucitron: data-cookie attribute can be used to delete arbitrary cookies (CVE-2026-49977)
Description
tarteaucitronjs versions prior to 1.33.0 contain a vulnerability where an attacker able to inject HTML with data attributes can create elements that delete arbitrary cookies when clicked. This occurs because the purge function does not verify the legitimacy of the element or ownership of the cookie. Exploitation requires user interaction and knowledge of the cookie name. The impact is limited to cookies without the HttpOnly flag.
CVSS v3.1
Score 4.3medium
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
In tarteaucitronjs versions before 1.33.0, the purge function responsible for deleting cookies does not validate whether the triggering element is a legitimate control or if the cookie targeted belongs to a managed service. An attacker who can inject HTML with data-cookie attributes can craft elements that, when clicked by a user, delete arbitrary cookies. This vulnerability requires user interaction and knowledge of the cookie name. Cookies flagged as HttpOnly are not affected. There is no indication of known exploits in the wild and no official patch information is provided.
Potential Impact
An attacker with the ability to inject HTML and knowledge of cookie names can cause users to delete arbitrary cookies that are not protected by the HttpOnly flag. This could disrupt user sessions or application functionality relying on such cookies. The vulnerability does not allow direct cookie theft or modification, and requires user interaction, limiting its severity.
Mitigation Recommendations
Patch status is not yet confirmed — check the vendor advisory for current remediation guidance. Until a fix is available, restrict or sanitize user-supplied HTML to prevent injection of elements with data-cookie attributes. 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/25/2026, 20:59:49 UTC
Last updated: 07/31/2026, 19:22:59 UTC
Views: 71
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.