CVE-2024-24828
published medium CVSS 3.1 · 6.6Local Privilege Escalation in execuatables bundled by pkg
Package status and fixes
Description
pkg is tool design to bundle Node.js projects into an executables. Any native code packages built by `pkg` are written to a hardcoded directory. On unix systems, this is `/tmp/pkg/*` which is a shared directory for all users on the same local system. There is no uniqueness to the package names within this directory, they are predictable. An attacker who has access to the same local system has the ability to replace the genuine executables in the shared directory with malicious executables of the same name. A user may then run the malicious executable without realising it has been modified. This package is deprecated. Therefore, there will not be a patch provided for this vulnerability. To check if your executable build by pkg depends on native code and is vulnerable, run the executable and check if `/tmp/pkg/` was created. Users should transition to actively maintained alternatives. We would recommend investigating Node.js 21’s support for single executable applications. Given the decision to deprecate the pkg package, there are no official workarounds or remediations provided by our team. Users should prioritize migrating to other packages that offer similar functionality with enhanced security.
Related advisories
Vendor advisories explicitly linked to this CVE.
No linked advisories were found for this CVE.
Assessment
CVSS risk assessment and additional context for this vulnerability.
- CVSS version
- 3.1
- Base score
- 6.6 / 10
- Severity
- medium
- Provider
- GitHub_M · cna
- Vector string
- CVSS:3.1/AV:L/AC:L/PR:L/UI:R/S:U/C:H/I:H/A:N
Publisher product statements
Version ranges and default statuses as reported by each provider.
| Vendor | Product | Version status | Source |
|---|---|---|---|
| vercel | pkg | <= 5.8.1 (affected) | GitHub_M · cna |
| vercel | pkg | 0 through 5.8.1 (affected · custom)Default: unknown | CISA-ADP · adp |
Weaknesses
1- CWE-276 CWE-276: Incorrect Default Permissions
References
2Provider assertions
3GitHub_M · cna
Local Privilege Escalation in execuatables bundled by pkg
CISA-ADP · adp
CISA ADP Vulnrichment
CVE · adp
CVE Program Container
Provenance
- Schema
- 5.1
- Searchable
- yes
- Content hash
- 54050a782386a0cc1dc38f71572633a14ea30354a0b2cb66a2fbaf78795fb156
- Ingested
- 23 Sep 2026, 08:19:54 UTC
- Source record
- Official CVE record