Root command execution via injected Portfile evaluation
Published Jan 7, 2025 · Updated Jan 7, 2025
OS command injection in MacPorts before 2.10.5 allows remote attackers controlling a mirror to execute arbitrary commands as root during selfupdate. The client extracts a signed ports archive into the rsync target directory, then runs portindex there when no current index is available; server-side-only rsync filters let the mirror add an unsigned Portfile whose Tcl code portindex evaluates. The client must run port selfupdate against a malicious or compromised mirror, after which the injected commands execute with the client's root privileges.
Summary
What happened
OS command injection in MacPorts before 2.10.5 allows remote attackers controlling a mirror to execute arbitrary commands as root during selfupdate. The client extracts a signed ports archive into the rsync target directory, then runs portindex there when no current index is available; server-side-only rsync filters let the mirror add an unsigned Portfile whose Tcl code portindex evaluates. The client must run port selfupdate against a malicious or compromised mirror, after which the injected commands execute with the client's root privileges.
The record
- CVE
- CVE-2024-11681
- Published
- Jan 7, 2025
- Updated
- Jan 7, 2025
- Vendor
- MacPorts Project
- Product
- MacPorts
- Classifications
- CWE-78, T1195.002
- Attack vector
- network
- Privileges
- admin
Timeline
How it unfolded
- Jan 7, 2025CVE publishedPublication date reported by the CVE source.
- Jan 7, 2025Record updatedLatest update available in the CVE record.
Exploitability
Present is not the same as exploitable
Compare your product and version with the public record. A matching version still requires validation against your environment.
Is a vulnerable build present?
Compare these published version ranges with your installed build and any vendor patches.
- Affected versionversion=< 2.10.5
What conditions does exploitation require?
What is affected?
Attacks
What attackers are doing with it
Daily unique IPs observed by Shadowserver honeypots for known exploited vulnerabilities (KEVs). Missing observations do not establish an absence of attacks.
Weakness, pattern, technique
Public exploit references
- Google Security Research malicious-mirror proof of conceptproof of concept · demonstrated
Labels summarize the accepted research assessment. They do not indicate a test against your environment.
Technologies
Your stack
See the directory against your own environment.
Your stack
Check the software in your environment
Book a demo to see how Hinoki identifies affected software and validates exploitability in your environment.
Book a demo