CVE-2024-53441: Cookie encrypter Bit Flip Attack Vulnerability Vulnerability

HIGH
Advisory Identifier: GHSA-h63v-hw6g-x8hp
CVSS 8.2
CWE-327 CWE-325
Published
Advisory Summary

CVE-2024-53441 is a HIGH (CVSS 8.2) bit flip attack vulnerability vulnerability (CWE-327: Use of a Broken or Risky Cryptographic Algorithm) affecting Cookie encrypter libraries in the npm ecosystem. The issue involves bit flip attack vulnerability in cookie-encrypter. Remediation is available in the latest vendor maintenance releases.

CVE-2024-53441 at a Glance

CVE Identifier CVE-2024-53441
GHSA Identifier GHSA-h63v-hw6g-x8hp
Severity HIGH
CVSS v3.1 Base Score 8.2
CWE Classification CWE-327: Use of a Broken or Risky Cryptographic Algorithm
Affected Product Cookie encrypter
Package Ecosystem npm
Published Date
Last Updated

Security Impact

CVSS: 8.2

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:N/S:U/C:L/I:H/A:N).

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

How to Fix CVE-2024-53441

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

cookie-encrypter fixed: Latest secure release
npm install cookie-encrypter@Latest secure release
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 cookie-encrypter

How to Check if You Are Affected

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

npm ls cookie-encrypter

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

Note: The npm ls cookie-encrypter 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-327: Use of a Broken or Risky Cryptographic Algorithm, where the product uses a broken or risky cryptographic algorithm or protocol. In Cookie encrypter, 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

due to a weakness in the encryption method used in cookie-encrypter an attack can use the world visible IV to edit encrypted cookies without decrypting the cookie itself. This is known as an AES CBC bit flipping attack.

CVE-2024-53441 Affected Cookie encrypter Versions

1 component(s)
Product / Package Ecosystem Affected Versions Fixed Version
cookie-encrypter
npm
≤ 1.0.1

References

Frequently Asked Questions

What is CVE-2024-53441?
CVE-2024-53441 is a security vulnerability in Cookie encrypter involving Bit flip attack vulnerability in cookie-encrypter under CWE-327: Use of a Broken or Risky Cryptographic Algorithm.
Which Cookie encrypter versions are affected?
Affected versions include releases prior to current release patches across affected packages: cookie-encrypter.
What version fixes CVE-2024-53441?
Upgrading to current release patches (or the latest patched release for your respective branch) resolves the vulnerability.
Is cookie-encrypter affected?
Yes, cookie-encrypter is affected in releases prior to Latest secure release. Upgrade your dependency to Latest secure release or later.
What is the CVSS score of CVE-2024-53441?
CVE-2024-53441 has a CVSS v3.1 base score of 8.2 (HIGH) with vector string CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:L/I:H/A:N.
What CWE is associated with CVE-2024-53441?
CVE-2024-53441 is classified under CWE-327: Use of a Broken or Risky Cryptographic Algorithm (The product uses a broken or risky cryptographic algorithm or protocol.).
How can I check npm dependencies for CVE-2024-53441?
Run the dependency tree command: 'npm ls cookie-encrypter'. 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-h63v-hw6g-x8hp",
  "modified" : "2024-12-11T21:35:13Z",
  "published" : "2024-12-09T21:31:02Z",
  "aliases" : [ "CVE-2024-53441" ],
  "summary" : "Bit flip attack vulnerability in cookie-encrypter",
  "details" : "due to a weakness in the encryption method used in cookie-encrypter an attack can use the world visible IV to edit encrypted cookies without decrypting the cookie itself. This is known as an AES CBC bit flipping attack.",
  "severity" : [ {
    "type" : "CVSS_V3",
    "score" : "CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:L/I:H/A:N"
  } ],
  "affected" : [ {
    "package" : {
      "ecosystem" : "npm",
      "name" : "cookie-encrypter"
    },
    "ranges" : [ {
      "type" : "ECOSYSTEM",
      "events" : [ {
        "introduced" : "0"
      }, {
        "last_affected" : "1.0.1"
      } ]
    } ]
  } ],
  "references" : [ {
    "type" : "ADVISORY",
    "url" : "https://nvd.nist.gov/vuln/detail/CVE-2024-53441"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/ebourmalo/cookie-encrypter/issues/9"
  }, {
    "type" : "WEB",
    "url" : "https://crypto.stackexchange.com/questions/66085/bit-flipping-attack-on-cbc-mode"
  }, {
    "type" : "WEB",
    "url" : "https://gist.github.com/mathysEthical/f45f1503f87381090e38a33c50eec971"
  }, {
    "type" : "PACKAGE",
    "url" : "https://github.com/ebourmalo/cookie-encrypter"
  }, {
    "type" : "WEB",
    "url" : "https://mathys.reboux.pro/CVE/2024/53441"
  } ],
  "database_specific" : {
    "cwe_ids" : [ "CWE-325", "CWE-327" ],
    "severity" : "HIGH",
    "github_reviewed" : true,
    "github_reviewed_at" : "2024-12-11T21:35:13Z",
    "nvd_published_at" : "2024-12-09T20:15:20Z"
  }
}