Predictable Package Names in pkg Lead to Security Risks
CVE-2024-24828
Key Information:
Timeline
Vulnerability published
Vulnerability Reserved
How risky is it?
- No: Needs local access
- No: No public exploit yet
- No: Not on CISA's exploited list
- No: No ransomware use seen
Our verdict
Check today
Find out if you're affected. If you are, patch.
What to do
1Check the vendor's fix
No fixed version is recorded yet. The vendor advisory is the authoritative source for patches.
Read the vendor advisory β2Why it's rated "Check today"
- Its CVSS severity is high (7.8).
What is CVE-2024-24828?
The pkg tool from Vercel, intended for bundling Node.js projects into executable files, exposes a vulnerability due to its use of a hardcoded directory on Unix systems, specifically /tmp/pkg/*. This shared directory lacks uniqueness for package names, making it predictable and susceptible to exploitation. If an attacker gains access to the local system, they can substitute legitimate executables with malicious ones of the same name, which users may unknowingly execute. The pkg tool is deprecated and will not receive patches for this vulnerability. Users are advised to check if their executables rely on native code and utilize the /tmp/pkg/ directory. Transitioning to actively maintained alternatives, such as Node.js 21βs single executable applications support, is strongly recommended for enhanced security.
Affected Version(s)
pkg <= 5.8.1
References
More vercel Vulnerabilities
SVG Injection in Satori Library
Path Traversal in Next.js Framework
Server-Side Request Forgery in Next.js
Facts on this page come from the sources listed above; the writeup is AI-assisted. How we rate vulnerabilities Β· Report a correction