{"id":"CVE-2026-28207","published":"2026-02-26T22:17:58Z","modified":"2026-03-02T20:48:09Z","title":"Zen-C Vulnerable to Command Injection via Malicious Output Filename","vendor":"z-libs","product":"Zen-C","tier":"tail","description":{"text":"Zen C is a systems programming language that compiles to human-readable GNU C/C11. Prior to version 0.4.2, a command injection vulnerability (CWE-78) in the Zen C compiler allows local attackers to execute arbitrary shell commands by providing a specially crafted output filename via the `-o` command-line argument. The vulnerability existed in the `main` application logic (specifically in `src/main.c`), where the compiler constructed a shell command string to invoke the backend C compiler. This command string was built by concatenating various arguments, including the user-controlled output filename, and was subsequently executed using the `system()` function. Because `system()` invokes a shell to parse and execute the command, shell metacharacters within the output filename were interpreted by the shell, leading to arbitrary command execution. An attacker who can influence the command-line arguments passed to the `zc` compiler (like through a build script or a CI/CD pipeline configuration) can execute arbitrary commands with the privileges of the user running the compiler. The vulnerability has been fixed in version 0.4.2 by removing `system()` calls, implementing `ArgList`, and internal argument handling. Users are advised to update to Zen C version v0.4.2 or later.","provenance":"source","from":"CVE.org"},"cvss":{"score":6.6,"severity":"MEDIUM","version":"3.1","vector":"CVSS:3.1/AV:L/AC:L/PR:N/UI:R/S:U/C:L/I:H/A:L","provenance":"source","from":"CVE.org CNA"},"epss":{"score":0.01064,"percentile":0.65503,"provenance":"source"},"cwes":[{"id":"CWE-78","name":"Improper Neutralization of Special Elements used in an OS Command"}],"references":[{"url":"https://github.com/z-libs/Zen-C/security/advisories/GHSA-9rff-x96h-76h2","tags":["x_refsource_CONFIRM"]},{"url":"https://f0nduesav0yarde.github.io/blog/vulnerabilities/cve-2026-28207/","tags":[]}],"priority":{"score":17.7,"factors":[{"name":"EPSS percentile","points":13.1},{"name":"CVSS severity","points":4.62}]},"vendorSlug":"z-libs","affectedVersions":[{"vendor":"z-libs","product":"Zen-C","versions":["< 0.4.2"]}],"ssvc":{"exploitation":"poc","automatable":"no","technicalImpact":"partial","timestamp":"2026-03-02T20:48:05.636087Z","from":"CISA ADP","provenance":"source"},"euvd":{"id":"EUVD-2026-8908","exploited":false,"provenance":"source"}}