Vulnerabilities in pkg:npm/tarteaucitronjs

PACKAGE
Advisory Identifier: GHSA-jxj7-g6gm-49j7
Advisory Summary

CVE-2026-49977 is a MODERATE (CVSS 4.3) data-cookie attribute can be used vulnerability (CWE-285: Improper Authorization) affecting tarteaucitron libraries in the npm ecosystem. The issue involves data-cookie attribute can be used to delete arbitrary cookies. Remediation is available by upgrading affected packages to version 1.33.0.

8 Known Advisory Record(s)
Package Vulnerability Intelligence

pkg:npm/tarteaucitronjs

8 Known Advisory Record(s)

Vulnerability advisories affecting package pkg:npm/tarteaucitronjs. Select an advisory below to view technical details or fixes.

Advisory ID CVE / NVD Severity Summary
GHSA-jxj7-g6gm-49j7 CVE-2026-49977 MODERATE tarteaucitron: data-cookie attribute can be used to delete arbitrary cookies
GHSA-q5f6-qxm2-mcqm CVE-2026-22809 MODERATE tarteaucitron.js has Regular Expression Denial of Service (ReDoS) vulnerability
GHSA-q43x-79jr-cq98 CVE-2025-48939 MODERATE tarteaucitron.js vulnerable to DOM Clobbering via document.currentScript
GHSA-p5g4-v748-6fh8 CVE-2025-31476 MODERATE tarteaucitron.js allows url scheme injection via unfiltered inputs
GHSA-4hwx-xcc5-2hfc CVE-2025-31475 MODERATE tarteaucitron.js allows prototype pollution via custom text injection
GHSA-7524-3396-fqv3 CVE-2025-31138 MODERATE tarteaucitron.js allows UI manipulation via unrestricted CSS injection
GHSA-8wp9-x25p-8794 CVE-2025-1467 LOW tarteaucitron Cross-site Scripting (XSS)
GHSA-f44m-65h3-99vc CVE-2023-3620 MODERATE tarteaucitron.js vulnerable to Cross-site Scripting

CVE-2026-49977 at a Glance

CVE Identifier CVE-2026-49977
GHSA Identifier GHSA-jxj7-g6gm-49j7
Severity MODERATE
CVSS v3.1 Base Score 4.3
CWE Classification CWE-285: Improper Authorization
Affected Product tarteaucitron
Package Ecosystem npm
Published Date
Last Updated

Security Impact

CVSS: 4.3

The security impact metrics below are parsed directly from the CVSS v3.1 vector string (CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:U/C:N/I:L/A:N).

Attack Vector Network (AV:N)
Attack Complexity Low (AC:L)
Privileges Required None (PR:N)
User Interaction Required (UI:R)
Scope Unchanged (S:U)
Confidentiality None (C:N)
Integrity Low (I:L)
Availability None (A:N)

How to Fix CVE-2026-49977

To remediate this vulnerability, upgrade all affected tarteaucitron dependencies to a patched release. Both direct and transitive dependencies should be checked, as frameworks or security libraries may pull in vulnerable versions transitively.

tarteaucitronjs fixed: 1.33.0
npm install tarteaucitronjs@1.33.0
Verify Direct and Transitive Dependencies

Run the following command in your project directory to verify that all resolved dependencies use the patched release:

npm ls tarteaucitronjs

How to Check if You Are Affected

To determine whether your Node.js application is affected by CVE-2026-49977, inspect your project dependencies using npm:

npm ls tarteaucitronjs

Analyze the terminal output to locate any version of tarteaucitron in your dependency tree. If any resolved version matches the vulnerable ranges listed in the table below (for example, versions earlier than 1.33.0), your application is affected.

Note: The npm ls tarteaucitronjs command inspects dependencies declared in your package.json and lockfile; it does not perform automated runtime dynamic scanning.

Technical Details

Vulnerability Mechanism & Technical Analysis

This vulnerability is classified under CWE-285: Improper Authorization, where the product does not perform or incorrectly performs an authorization check when an actor attempts to access a resource or perform an action. In tarteaucitron, software state validation or input boundaries are circumvented during processing. Review the official source advisory statement below for specific affected components, classes, and reproduction details.

Source Advisory Statement

### Summary tarteaucitron 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. ### Details `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. ### PoC ```html <a class="purgeBtn" data-cookie="foo">Click me!</a> ``` If someone has a cookie with this name and clicks on the link, the cookie is silently deleted. ### Impact The impact is limited because this only works on cookies without HttpOnly=true and the attacker has to know the name of the cookie.

CVE-2026-49977 Affected tarteaucitron Versions

1 component(s)
Fixed Versions:
1.33.0
Product / Package Ecosystem Affected Versions Fixed Version
tarteaucitronjs
npm
< 1.33.0
1.33.0

References

Frequently Asked Questions

What is CVE-2026-49977?
CVE-2026-49977 is a security vulnerability in tarteaucitron involving data-cookie attribute can be used to delete arbitrary cookies under CWE-285: Improper Authorization.
Which tarteaucitron versions are affected?
Affected versions include releases prior to 1.33.0 across affected packages: tarteaucitronjs.
What version fixes CVE-2026-49977?
Upgrading to 1.33.0 (or the latest patched release for your respective branch) resolves the vulnerability.
Is tarteaucitronjs affected?
Yes, tarteaucitronjs is affected in releases prior to 1.33.0. Upgrade your dependency to 1.33.0 or later.
What is the CVSS score of CVE-2026-49977?
CVE-2026-49977 has a CVSS v3.1 base score of 4.3 (MODERATE) with vector string CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:U/C:N/I:L/A:N.
What CWE is associated with CVE-2026-49977?
CVE-2026-49977 is classified under CWE-285: Improper Authorization (The product does not perform or incorrectly performs an authorization check when an actor attempts to access a resource or perform an action.).
How can I check npm dependencies for CVE-2026-49977?
Run the dependency tree command: 'npm ls tarteaucitronjs'. This command lists direct and transitive dependencies in your build configuration so you can verify if a vulnerable version is resolved.
Machine-readable OSV JSON OSV v1.5 Schema
Normalized schema output
{
  "schema_version" : "1.4.0",
  "id" : "GHSA-jxj7-g6gm-49j7",
  "modified" : "2026-07-10T16:05:00Z",
  "published" : "2026-07-10T16:05:00Z",
  "aliases" : [ "CVE-2026-49977" ],
  "summary" : "tarteaucitron: data-cookie attribute can be used to delete arbitrary cookies",
  "details" : "### 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.",
  "severity" : [ {
    "type" : "CVSS_V3",
    "score" : "CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:U/C:N/I:L/A:N"
  } ],
  "affected" : [ {
    "package" : {
      "ecosystem" : "npm",
      "name" : "tarteaucitronjs"
    },
    "ranges" : [ {
      "type" : "ECOSYSTEM",
      "events" : [ {
        "introduced" : "0"
      }, {
        "fixed" : "1.33.0"
      } ]
    } ]
  } ],
  "references" : [ {
    "type" : "WEB",
    "url" : "https://github.com/AmauriC/tarteaucitron.js/security/advisories/GHSA-jxj7-g6gm-49j7"
  }, {
    "type" : "PACKAGE",
    "url" : "https://github.com/AmauriC/tarteaucitron.js"
  } ],
  "database_specific" : {
    "cwe_ids" : [ "CWE-285" ],
    "severity" : "MODERATE",
    "github_reviewed" : true,
    "github_reviewed_at" : "2026-07-10T16:05:00Z",
    "nvd_published_at" : null
  }
}