Skip to content
FlawDB
Sign in
Archived entry. Full-text search covers entries since 2026-11-10; exact IDs work for all years.

CVE-2024-42381

HIGH 8.3EPSS 68%

os/linux/elf.rb in Homebrew brew before 4.2.20 uses ldd to load ELF files obtained from untrusted sources, which allows…

Mitigation

  • Upgrade brew to 4.2.20 or later.

Who should check

  • Anyone running n/a (versions: see the vendor advisory)
  • Anyone running homebrew brew < 4.2.20

Vulnerability facts

Affected
n/a; homebrew brew < 4.2.20
Fixed in
homebrew brew 4.2.20
Exploited in the wild
Not in CISA KEV
Public exploit / PoC
None known
Remote exploitation
Remote, no login needed
CVSS
8.3 (v3.1, CNA)CVSS:3.1/AC:H/AV:N/A:H/C:H/I:H/PR:N/S:C/UI:ROpen in CVSS calculator
Show all 8 CVSS metrics
  • Attack complexity: High
  • Attack vector: Network
  • Availability impact: High
  • Confidentiality impact: High
  • Integrity impact: High
  • Privileges required: None
  • Scope: Changed (impact reaches other components)
  • User interaction: Required
EPSS
1.18% chance of exploitation in 30 days (percentile 68, 2026-11-26)
CWE
CWE-830
Published
Modified

Description

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.)

Affected and fixed versions

Package / productAffectedFixedSource
n/a——nvd
homebrew brew< 4.2.20—nvd

Check your systems with an agent

Paste this into Claude Code, Cursor or another coding agent. It only reads; it changes nothing.

Check whether anything I run is affected by CVE-2024-42381. Work read-only: do not install, upgrade, delete or change anything.

Details: https://flawdb.com/CVE-2024-42381.md
Affected: n/a; homebrew brew < 4.2.20
Fixed in: homebrew brew 4.2.20

Steps:
1. Search this machine and project for n/a, homebrew brew: dependency manifests and lockfiles, installed packages, container images and running services.
2. For each match, note the installed version and whether it is inside the affected range.
3. Report a table: location, installed version, affected (yes / no / unsure), evidence. If affected, say which fixed version or mitigation from the details link applies, but don't apply it.

References

FAQ

Is CVE-2024-42381 being exploited?

There is no confirmed exploitation: CVE-2024-42381 is not in the CISA Known Exploited Vulnerabilities catalog. No public exploit code is known. EPSS estimates a 1.18% chance of exploitation in the next 30 days (as of 2026-11-26).

How serious is CVE-2024-42381?

High: CVSS 8.3 (v3.1, scored by CNA). Remote, no login needed. A user has to take an action, such as opening a link, for the attack to work. The attack needs conditions outside the attacker's control, which makes it harder.

Which versions are affected by CVE-2024-42381?

n/a; homebrew brew < 4.2.20.

Is there a fix for CVE-2024-42381?

Yes. Fixed in homebrew brew 4.2.20. Upgrade brew to 4.2.20 or later.

How do I check if I'm affected by CVE-2024-42381?

Find where you use the affected software (dependency lockfiles, installed packages, container images, servers) and compare the installed version with the affected range above. The agent prompt on this page does this read-only.

Sponsors