---
id: "CVE-2026-54630"
kind: "vulnerability"
aliases: ["CVE-2026-54630"]
title: "Part-DB: attachment upload lets a logged-in user run PHP code"
severity: "critical"
cvss: 9.6
epss: 0.00234
exploited: false
status: "open"
category: "package"
products: []
ecosystems: []
tags: ["apache", "docker", "package", "part-db", "php", "self-hosted"]
not_affected_if: ["non-apache-webserver-without-phar-routing", "version-2.12.1-or-later"]
published_at: "2026-10-23T04:18:17+00:00"
first_seen_at: "2026-10-23T21:57:32+00:00"
updated_at: "2026-10-24T07:15:51+00:00"
sources: [{"source": "nvd", "url": "https://nvd.nist.gov/vuln/detail/CVE-2026-54630", "first_seen_at": "2026-10-23T21:57:32+00:00"}, {"source": "epss", "url": "https://api.first.org/data/v1/epss?cve=CVE-2026-54630", "first_seen_at": "2026-10-24T07:15:51+00:00"}]
---

# Part-DB: attachment upload lets a logged-in user run PHP code

Part-DB, an inventory system for electronic parts, accepts uploaded .phar files without blocking them and stores them in the public media folder. An authenticated user in the default users group can upload a .phar attachment and request it to execute arbitrary PHP as the web server user.

_Summary, check and fix written by a model from the sources; labelled as such._

## How to check

Check the Part-DB version (must be below 2.12.1 to be affected) and confirm Apache routes .phar to PHP-FPM; unknown whether the sources give a specific command.

## Fix

Upgrade Part-DB to 2.12.1 or later. Until then, block .phar uploads or deny execution under /media/ in the web server config.

## Timeline

- 2026-10-23T21:57:32+00:00 nvd https://nvd.nist.gov/vuln/detail/CVE-2026-54630
- 2026-10-24T07:15:51+00:00 epss https://api.first.org/data/v1/epss?cve=CVE-2026-54630

## From the sources

Part-DB is an open source inventory management system for electronic components. Prior to version 2.12.1, the part attachment upload handler stores uploaded files under the web-served media directory using the client-supplied file extension, and its extension blocklist does not include phar. AttachmentSubmitHandler::renameBlacklistedExtensions() rewrites dangerous extensions (php, phtml, sh, cgi, py, js, html, htaccess, ...) to .txt, but phar is absent from the list, so a .phar file keeps its extension. Public attachments (the default) are written into public/media/, which is the Apache document root. The shipped Apache configuration routes .phar to PHP-FPM, so the stored file is executed as PHP on request. The per-attachment-type extension filter is empty by default and is not consulted by the upload handler in a way that blocks this, and a non-admin user in the default users group can create an attachment type with no filter and attach files to parts. Any authenticated user in the default users group uploads a .phar attachment to a part and fetches it under /media/, executing arbitrary PHP as the www-data web user. Ability to exploit depends on the webserver config, docker image contained the vulnerability by default. This issue has been patched in version 2.12.1.

---

_Free to read at a human pace. An API with keys and an MCP server are in preparation; early access: hello@infrastack.ai_
