CVE-2026-145569: lockfile-lint-api 5.2.1 before 5.10.0 Package Name Validation Bypass via ValidatePackageNames
lockfile-lint-api 5.2.1 before 5.10.0 contains a validation bypass vulnerability in ValidatePackageNames.validate() that allows attackers to evade package name checks by using dot segments in resolved URLs. Attackers can submit a crafted lockfile declaring a trusted package name with a resolved path traversing to their own registry package, causing npm to install it instead.
Affected Software
Remediation
Recommended actions to resolve this vulnerability, in priority order.
- Upgrade
Upgrade
npm/lockfile-lint-apito a version that resolves this vulnerability.Fixed in 5.10.0
Event History
Frequently Asked Questions
Who is realistically exposed to this issue?
Users of lockfile-lint-api versions 5.2.1 before 5.10.0 are exposed when they validate lockfiles that an attacker can craft or influence. The attack targets workflows that rely on ValidatePackageNames.validate() to enforce package-name checks before npm installation.
What must an attacker provide to exploit the bypass?
The attacker must submit a crafted lockfile that declares a trusted package name but uses dot segments in the resolved URL to traverse to a package in an attacker-controlled registry. User interaction is required, consistent with a victim using the affected workflow and installing from that lockfile.
How can I tell whether a lockfile may be malicious?
Inspect entries for a mismatch between the declared package name and the package location indicated by the resolved URL. In particular, look for dot segments in resolved URLs that could change the effective registry package path.
What version addresses the issue?
The affected range is 5.2.1 before 5.10.0, so version 5.10.0 is the first version identified as outside that range.