CVE-2026-70374 PUBLISHED

HashBrown CMS: OS Command Injection in Media Upload Thumbnail Generation

Assigner: TuranSec
Reserved: 04.08.2026 Published: 05.08.2026 Updated: 05.08.2026

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.

Metrics

CVSS Vector: CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H
CVSS Score: 8.8

Product Status

Vendor HashBrownCMS
Product hashbrown-cms
Versions Default: unknown
  • affected from 0 to 1.4.6 (incl.)

Credits

  • Alijonov Alisher finder

References

Problem Types

  • CWE-78 OS Command Injection CWE