CVE-2024-42381 json
os/linux/elf.rb in Homebrew brew before 4.2.20 uses ldd to load ELF files obtained from untrusted sources, which allows attackers to achiev…
published 2024-07-31 2 y ago modified 2026-06-17 4 mo ago also EUVD-2024-39586
- cvss
- 8.3
- version 3.1, CNA
- cisa kev
- Not listed
- not in CISA's catalog
- epss
- 0.6%
- EPSS 0.6% chance of exploitation in 30 days, percentile 51%
- public exploits
- 0
- none known
Summary
os/linux/elf.rb in Homebrew brew before 4.2.20 uses ldd to load ELF files obtained from untrusted sources, which allows attackers to achieve code execution via an ELF file with a custom .interp section. NOTE: this code execution would occur during an un-sandboxed binary relocation phase, which occurs before a user would expect execution of downloaded package content. (237d1e783f7ee261beaba7d3f6bde22da7148b0a was the tested vulnerable version.)
Patch / fix
- homebrew brew 4.2.20
- github.com/Homebrew/brew@916b373 commit
- github.com/Homebrew/brew#17136 pull request
- github.com/Homebrew/brew/releases/tag/4.2.20 release
CISA SSVC
- Exploitation
- none
- Automatable
- no
- Technical impact
- total
- Assessed
- 2 y ago
Exploit prediction
0.65% chance of exploitation in the next 30 days, higher than 51% of all scored CVEs (FIRST EPSS, 2026-11-08).
CVSS scores
| assigned by | version | score | vector |
|---|---|---|---|
| CNA | 3.1 | 8.3 | CVSS:3.1/AC:H/AV:N/A:H/C:H/I:H/PR:N/S:C/UI:R |
| CNA | 3.1 | 8.3 | CVSS:3.1/AV:N/AC:H/PR:N/UI:R/S:C/C:H/I:H/A:H |
Affected products
- homebrew brew
Classification
- Weakness
-
- CWE-830 Inclusion of Web Functionality from an Untrusted Source
References
- github.com /Homebrew/brew/commit/916b37388d3851a8a93a8e9b4adc38873680ead7
- github.com /Homebrew/brew/pull/17136
- github.com /Homebrew/brew/tree/237d1e783f7ee261beaba7d3f6bde22da7148b0a
- github.com /trailofbits/publications/blob/master/reviews/2023-08-28-homebrew-securityreview.pdf
- blog.trailofbits.com /2024/07/30/our-audit-of-homebrew/
- brew.sh /2024/07/30/homebrew-security-audit/
- github.com /Homebrew/brew/releases/tag/4.2.20
Sources
- CVE List CVE-2024-42381
- NVD CVE-2024-42381
Fencer Vulns keeps one entry per vulnerability: the CVE id wins, then GHSA, and records that alias each other are merged, except that two CVEs always keep separate entries. The same data is available as JSON.