Skip to content
Access control Disclosed report Intermediate

Homebrew privilege escalation vulnerability

Homebrew's `brew services` did not change ownership of additional symlinks and directories, allowing an attacker to replace the `opt` prefix link. This could let an attacker gain root permission.

hi_ztz Follow

Originally disclosed on HackerOne

High 8.8 View original
  • Disclosed after 25 days

Summary by the program

Additional symlinks/directories that were not chownd by brew services needed to be added to avoid the replacement of the opt prefix link.

Summary by the researcher

Homebrew has a privilege escalation vulnerability which can cause an attacker easily gain root permission.

The original report as published on HackerOne, by hi_ztz. Images and videos are our own copies; raw HTML is shown as text. View it on HackerOne.

Not written yet. The AI write-up for this report has not been written yet. The Original tab links to the source.

How it worked

Impact

An attacker could gain root permission, though the text gives no further detail on how reliably this works.

Explained by bugbounty.wiki with AI from the original and checked against quotes from it; it can still be wrong. Read the original before relying on a detail.

Not written yet. The AI write-up for this report has not been written yet. The Original tab links to the source.

Homebrew is a tool for installing software on macOS. A symlink is a shortcut that points to another file or folder. The report says some shortcuts were not properly protected, so an attacker could swap one out and possibly get the highest level of access on the computer, called root.

What is Access control?

A user can do something their role should not allow: reach an admin function, act on a feature they have not paid for, or skip a permission check. IDOR is the special case where the object belongs to someone else.

More from Homebrew

View all

The newest disclosed reports for this program.

Similar reports

View all

Same bug class and techniques, clearest first.

Broken access control

The lesson behind this report.

A user can do something their role should not allow: reach an admin function, act on a feature they have not paid for, or skip a permission check. IDOR is the special case where the object belongs to someone else.