CVE-2026-70374: HashBrown CMS: OS Command Injection in Media Upload Thumbnail Generation
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.
Affected Software
Event History
Frequently Asked Questions
What is the severity of CVE-2026-70374?
CVE-2026-70374 has a risk severity score of 80.
How do I fix CVE-2026-70374?
To fix CVE-2026-70374, ensure that the thumbnail file path in the Media.generateThumbnail() function is properly escaped.
What type of vulnerability is CVE-2026-70374?
CVE-2026-70374 is an OS Command Injection vulnerability as categorized by CWE-78.
In which version of HashBrown CMS is CVE-2026-70374 present?
CVE-2026-70374 is present in HashBrown CMS version 1.4.6.
What functionality is affected by CVE-2026-70374?
CVE-2026-70374 affects the media upload thumbnail generation routine.