Skip to main content
VulnerabilityPublished

CVE-2024-42381: brew · Inclusion of Web Functionality from an Untrusted Source

Affects brewSource CVE Database V5

0

Not known to be exploited · CVSS 8.3 High : upgrade to 4.2.20 soon.

Data as of 26 Oct 2026, 11:42 UTC

CVSS 3.1 base score
8.3High
How severe the flaw is on the 0–10 CVSS scale.
EPSS
0.6% chance of exploitation in 30 days – higher than 50% of CVEsExploit Prediction Scoring System: the likelihood attackers will use this flaw soon.
Patch
Available – fixed in 4.2.20
CVSS:3.1/AC:H/AV:N/A:H/C:H/I:H/PR:N/S:C/UI:R

Exploitation evidence

  1. Disclosed: evidence found.

    CVE published 31 Jul 2024

  2. Detectable: no evidence on record.

    No public nuclei template indexed

  3. Weaponised: no evidence on record.

    No public exploit code indexed in Metasploit or Exploit-DB

  4. Exploited in the wild: no evidence on record.

    Not in CISA KEV and no source reports exploitation

  5. Observed by OffSeq Mirage: no evidence on record.

    No attack traffic recorded by OffSeq Mirage sensors

A missing step is not evidence of safety. Sources: cve.org (opens in a new tab), the Metasploit, Exploit-DB and nuclei-templates index as of 26 Oct 2026.

What to do

Upgrade homebrew/brew to 4.2.20.

Affected software

ProductAffectedFixed in
GitHubhomebrew/brewpkg:github/homebrew/brewOther threatsAffected
  • <4.2.20
Fixed in
  • 4.2.20

Check your own hosts for these packages with threat-finder (opens in a new tab), our free open-source scanner.

AI-suggested

To mitigate CVE-2024-42381, organizations should immediately upgrade Homebrew to version 4.2.20 or later, where the vulnerability has been addressed. Avoid installing or loading ELF binaries from untrusted or unverified sources, especially those that could contain malicious .interp sections. Implement strict package source validation and use cryptographic signatures to verify package integrity before installation. Employ runtime monitoring tools to detect unusual process behaviors during package installation and binary relocation phases. Consider sandboxing or containerizing package management operations to limit the impact of potential code execution. Educate users and administrators about the risks of installing untrusted packages and the importance of applying security updates promptly. For environments with high security requirements, restrict the use of Homebrew or similar package managers to trusted internal repositories only. Regularly audit and monitor systems for signs of compromise related to package management activities. Finally, maintain up-to-date backups to enable recovery in case of exploitation.

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

References

Community reviews

Loading reviews…