{"id":"CVE-2026-70374","summary":"HashBrown CMS: OS Command Injection in Media Upload Thumbnail Generation","details":"HashBrown CMS through 1.4.6 contains an OS Command Injection vulnerability (CWE-78) in the media upload thumbnail generation routine. Media.generateThumbnail() in src/Server/Entity/Resource/Media.js builds a temporary file path as 'thumbnail' + Path.extname(filename) and passes it, unescaped, into a shell command executed via AppService.exec() ('convert ' + tempFile + ...). The MIME-type filter in getMIMEType() (src/Common/utilities.js) truncates the extracted extension at the first '?' character, while Path.extname() does not, allowing a filename such as 'x.jpg?$(command)' to pass the image-type check while still injecting a shell command substitution into the exec() call. An authenticated user holding the media resource scope can achieve arbitrary OS command execution in the context of the Node.js process via POST /api/{project}/{environment}/media/new.","modified":"2026-08-07T03:46:11.647548452Z","published":"2026-08-05T05:46:19.284Z","database_specific":{"cwe_ids":["CWE-78"],"osv_generated_from":"https://github.com/CVEProject/cvelistV5/tree/main/cves/2026/70xxx/CVE-2026-70374.json","cna_assigner":"TuranSec"},"references":[{"type":"ADVISORY","url":"https://cve.turansec.uz/advisories/TRN-11FC0D88"},{"type":"ADVISORY","url":"https://github.com/CVEProject/cvelistV5/tree/main/cves/2026/70xxx/CVE-2026-70374.json"},{"type":"ADVISORY","url":"https://nvd.nist.gov/vuln/detail/CVE-2026-70374"},{"type":"PACKAGE","url":"https://github.com/HashBrownCMS/hashbrown-cms"}],"affected":[{"ranges":[{"type":"GIT","repo":"https://github.com/hashbrowncms/hashbrown-cms","events":[{"introduced":"0"},{"fixed":"790814f7d4209bb36850f2923b1726fef4d96d8e"}],"database_specific":{"extracted_events":[{"introduced":"0"},{"last_affected":"1.4.6"},{"fixed":"1.4.6"}],"source":["AFFECTED_FIELD","DESCRIPTION"]}}],"versions":["v1.4.5","v1.4.4","v1.4.3","v1.4.2","v1.4.1","v1.4.0","v1.2.1","v1.2.0","v1.1.4","v1.1.3","v1.1.2","v1.1.1","v1.1.0","v1.0.7","v1.0.6","v1.0.5","v1.0.4","v1.0.3","v1.0.2","v1.0.1","v0.10.2","v0.10.1","v0.10.0","v0.9.9","v0.9.5","v0.9.4","v0.9.3","v0.9.2","v0.9.0","v0.7.2"],"database_specific":{"source":"https://storage.googleapis.com/cve-osv-conversion/osv-output/CVE-2026-70374.json"}}],"schema_version":"1.8.0","severity":[{"type":"CVSS_V3","score":"CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H"}]}