Bug 2263749 (CVE-2024-24828) - CVE-2024-24828 pkg: incorrect default permissions
Summary: CVE-2024-24828 pkg: incorrect default permissions
Keywords:
Status: NEW
Alias: CVE-2024-24828
Product: Security Response
Classification: Other
Component: vulnerability
Version: unspecified
Hardware: All
OS: Linux
medium
medium
Target Milestone: ---
Assignee: Product Security
QA Contact:
URL:
Whiteboard:
Depends On: 2263750 2263751
Blocks: 2263752
TreeView+ depends on / blocked
 
Reported: 2024-02-11 16:04 UTC by ybuenos
Modified: 2024-05-03 06:13 UTC (History)
45 users (show)

Fixed In Version:
Clone Of:
Environment:
Last Closed:
Embargoed:


Attachments (Terms of Use)

Description ybuenos 2024-02-11 16:04:15 UTC
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.

https://github.com/vercel/pkg/security/advisories/GHSA-22r3-9w55-cj54
https://nodejs.org/api/single-executable-applications.html


Note You need to log in before you can comment on or make changes to this bug.