CVE-2024-24828

Source
https://nvd.nist.gov/vuln/detail/CVE-2024-24828
Import Source
https://storage.googleapis.com/cve-osv-conversion/osv-output/CVE-2024-24828.json
JSON Data
https://api.osv.dev/v1/vulns/CVE-2024-24828
Aliases
Related
Published
2024-02-09T23:15:09Z
Modified
2025-01-14T12:12:13.078731Z
Severity
  • 7.8 (High) CVSS_V3 - CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H CVSS Calculator
Summary
[none]
Details

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.

References

Affected packages

Git / github.com/vercel/pkg

Affected ranges

Type
GIT
Repo
https://github.com/vercel/pkg
Events
Introduced
0 Unknown introduced commit / All previous commits are affected
Last affected

Affected versions

3.*

3.0.0
3.0.1
3.0.2
3.0.3
3.0.4
3.0.5

4.*

4.0.0
4.1.0
4.1.1
4.1.2
4.1.3
4.1.4
4.2.0
4.2.1
4.2.2
4.2.3
4.2.4
4.2.5
4.3.0
4.3.0-beta.0
4.3.0-beta.1
4.3.0-beta.3
4.3.0-beta.4
4.3.0-beta.5
4.3.1
4.3.2
4.3.3
4.3.4
4.3.5
4.3.6
4.3.7
4.3.8-canary.0
4.4.0
4.4.1
4.4.2
4.4.3
4.4.4
4.4.5
4.4.6
4.4.7
4.4.8
4.4.9
4.5.0
4.5.1

5.*

5.0.0
5.1.0
5.2.0
5.2.1
5.3.0
5.3.1
5.3.2
5.3.3
5.3.4
5.4.0
5.4.1
5.4.2
5.5.0
5.5.1
5.5.2
5.6.0
5.7.0
5.8.0
5.8.1