Unauthenticated code execution via unsafe file upload
Published Mar 4, 2022 · Updated Aug 2, 2024
OS command injection in Part-DB before 0.5.11 allows remote attackers to execute arbitrary server commands via a crafted label logo upload. The show_part_label.php logo_file handler passes an uploaded filename to uploadFile, whose legacy denylist rejects only names containing .php and accepts executable .phtml files into data/media/labels. No authentication or user interaction is required, and successful exploitation runs attacker-supplied PHP with the web server process's access.
Summary
What happened
OS command injection in Part-DB before 0.5.11 allows remote attackers to execute arbitrary server commands via a crafted label logo upload. The show_part_label.php logo_file handler passes an uploaded filename to uploadFile, whose legacy denylist rejects only names containing .php and accepts executable .phtml files into data/media/labels. No authentication or user interaction is required, and successful exploitation runs attacker-supplied PHP with the web server process's access.
The record
- CVE
- CVE-2022-0848
- Published
- Mar 4, 2022
- Updated
- Aug 2, 2024
- Vendor
- Part-DB
- Product
- Part-DB
- Classifications
- CWE-78, T1190, T1505.003
- Attack vector
- network
- Privileges
- unauthenticated
Timeline
How it unfolded
- Mar 4, 2022CVE publishedPublication date reported by the CVE source.
- Aug 2, 2024Record 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=unspecified <0.5.11
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
- part-db 0.5.11 - Remote Code Execution (RCE)functional · 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