Katalog CVE

CVE-2026-54630

KrytyczneCVSS 9.6
Opublikowano: Przetłumaczono: NVD NIST

Streszczenie

W Part-DB przed wersją 2.12.1 mechanizm blokowania niebezpiecznych rozszerzeń przy przesyłaniu załączników nie obejmuje rozszerzenia .phar. Plik .phar przesłany jako załącznik trafia do katalogu public/media/, który jest dokument root Apache, a konfiguracja Apache kieruje .phar do PHP-FPM, co pozwala na wykonanie dowolnego kodu PHP.

Ocena ryzyka

Uwierzytelniony użytkownik z domyślnej grupy users może przesłać złośliwy plik .phar i uzyskać wykonanie kodu jako użytkownik www-data, co może prowadzić do przejęcia serwera.

Rekomendacja

Zaktualizuj Part-DB do wersji 2.12.1 lub nowszej oraz rozważ usunięcie .phar z obsługiwanych rozszerzeń w konfiguracji Apache/PHP-FPM.

Inne podatności w Part-DB

Zobacz wszystkie
Oryginalny opis (angielski, źródło NVD)

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.

Dane podatności pochodzą z NVD (NIST) · CISA KEV · EPSS