CVE-2026-54545: @wakaru/cli @wakaru/cli Arbitrary File Write During Vulnerability

HIGH
Advisory Identifier: GHSA-7wpj-vvmv-pgm8
CVSS 7.1
CWE-22
Published
Advisory Summary

CVE-2026-54545 is a HIGH (CVSS 7.1) @wakaru/cli arbitrary file write during vulnerability (CWE-22: Improper Limitation of a Pathname to a Restricted Directory ('Path Traversal')) affecting @wakaru/cli libraries in the npm ecosystem. The issue involves @wakaru/cli arbitrary file write during bundle unpack. Remediation is available by upgrading affected packages to version 1.4.0.

CVE-2026-54545 at a Glance

CVE Identifier CVE-2026-54545
GHSA Identifier GHSA-7wpj-vvmv-pgm8
Severity HIGH
CVSS v3.1 Base Score 7.1
CWE Classification CWE-22: Improper Limitation of a Pathname to a Restricted Directory ('Path Traversal')
Affected Product @wakaru/cli
Package Ecosystem npm
Published Date
Last Updated

Security Impact

CVSS: 7.1

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

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

How to Fix CVE-2026-54545

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

@wakaru/cli fixed: 1.4.0
npm install @wakaru/cli@1.4.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 @wakaru/cli

How to Check if You Are Affected

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

npm ls @wakaru/cli

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

Note: The npm ls @wakaru/cli 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-22: Improper Limitation of a Pathname to a Restricted Directory ('Path Traversal'), where the product uses external input to construct a pathname that is intended to identify a file or directory that is located underneath a restricted parent directory, but the product does not properly neutralize special elements within the pathname that can cause the pathname to resolve to a location that is outside of the restricted directory. In @wakaru/cli, 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

### Impact `@wakaru/cli` is vulnerable to arbitrary file write when unpacking a crafted JavaScript bundle with `--unpack`. Bundle-controlled module filenames were sanitized before writing extracted modules to the output directory. A crafted filename containing overlapping path traversal characters, such as `....//`, could be transformed into `../` after sanitization. This allowed the final output path to escape the intended output directory. An attacker who can cause a user to run `wakaru --unpack` on a malicious bundle may be able to write files outside the selected output directory. Depending on the target path and user environment, this may lead to code execution. Affected versions: `>=1.0.0 <1.4.0`. ### Patches The issue has been patched in `@wakaru/cli@1.4.0`. Users should upgrade to: ```sh npm install @wakaru/cli@latest ``` or specifically: ``` npm install @wakaru/cli@1.4.0 ``` ### Workarounds Do not run `wakaru --unpack` on untrusted or unknown bundles with affected versions. If upgrading immediately is not possible, avoid using `--unpack on files that may be attacker-controlled.

CVE-2026-54545 Affected @wakaru/cli Versions

1 component(s)
Fixed Versions:
1.4.0
Product / Package Ecosystem Affected Versions Fixed Version
@wakaru/cli
npm
≥ 1.0.0
< 1.4.0
1.4.0

References

Frequently Asked Questions

What is CVE-2026-54545?
CVE-2026-54545 is a security vulnerability in @wakaru/cli involving @wakaru/cli arbitrary file write during bundle unpack under CWE-22: Improper Limitation of a Pathname to a Restricted Directory ('Path Traversal').
Which @wakaru/cli versions are affected?
Affected versions include releases prior to 1.4.0 across affected packages: @wakaru/cli.
What version fixes CVE-2026-54545?
Upgrading to 1.4.0 (or the latest patched release for your respective branch) resolves the vulnerability.
Is @wakaru/cli affected?
Yes, @wakaru/cli is affected in releases prior to 1.4.0. Upgrade your dependency to 1.4.0 or later.
What is the CVSS score of CVE-2026-54545?
CVE-2026-54545 has a CVSS v3.1 base score of 7.1 (HIGH) with vector string CVSS:3.1/AV:L/AC:L/PR:N/UI:R/S:U/C:N/I:H/A:H.
What CWE is associated with CVE-2026-54545?
CVE-2026-54545 is classified under CWE-22: Improper Limitation of a Pathname to a Restricted Directory ('Path Traversal') (The product uses external input to construct a pathname that is intended to identify a file or directory that is located underneath a restricted parent directory, but the product does not properly neutralize special elements within the pathname that can cause the pathname to resolve to a location that is outside of the restricted directory.).
How can I check npm dependencies for CVE-2026-54545?
Run the dependency tree command: 'npm ls @wakaru/cli'. 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-7wpj-vvmv-pgm8",
  "modified" : "2026-07-28T14:44:02Z",
  "published" : "2026-07-28T14:44:01Z",
  "aliases" : [ "CVE-2026-54545" ],
  "summary" : "@wakaru/cli arbitrary file write during bundle unpack",
  "details" : "### Impact\n\n`@wakaru/cli` is vulnerable to arbitrary file write when unpacking a crafted JavaScript bundle with `--unpack`.\n\nBundle-controlled module filenames were sanitized before writing extracted modules to the output directory. A crafted filename containing overlapping path traversal characters, such as `....//`, could be transformed into `../` after sanitization. This allowed the final output path to escape the intended output directory.\n\nAn attacker who can cause a user to run `wakaru --unpack` on a malicious bundle may be able to write files outside the selected output directory. Depending on the target path and user environment, this may lead to code execution.\n\nAffected versions: `>=1.0.0 <1.4.0`.\n\n### Patches\n\nThe issue has been patched in `@wakaru/cli@1.4.0`.\n\nUsers should upgrade to:\n\n```sh\nnpm install @wakaru/cli@latest\n```\n\nor specifically:\n```\nnpm install @wakaru/cli@1.4.0\n```\n\n### Workarounds\n\nDo not run `wakaru --unpack` on untrusted or unknown bundles with affected versions.\n\nIf upgrading immediately is not possible, avoid using `--unpack on files that may be attacker-controlled.",
  "severity" : [ {
    "type" : "CVSS_V3",
    "score" : "CVSS:3.1/AV:L/AC:L/PR:N/UI:R/S:U/C:N/I:H/A:H"
  } ],
  "affected" : [ {
    "package" : {
      "ecosystem" : "npm",
      "name" : "@wakaru/cli"
    },
    "ranges" : [ {
      "type" : "ECOSYSTEM",
      "events" : [ {
        "introduced" : "1.0.0"
      }, {
        "fixed" : "1.4.0"
      } ]
    } ]
  } ],
  "references" : [ {
    "type" : "WEB",
    "url" : "https://github.com/pionxzh/wakaru/security/advisories/GHSA-7wpj-vvmv-pgm8"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/pionxzh/wakaru/commit/1d30383b20a6f768786b8ada2f1b0945de13c316"
  }, {
    "type" : "PACKAGE",
    "url" : "https://github.com/pionxzh/wakaru"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/pionxzh/wakaru/releases/tag/v1.4.0"
  } ],
  "database_specific" : {
    "cwe_ids" : [ "CWE-22" ],
    "severity" : "HIGH",
    "github_reviewed" : true,
    "github_reviewed_at" : "2026-07-28T14:44:01Z",
    "nvd_published_at" : null
  }
}