{"id":"CVE-2026-28207","aliases":["CVE-2026-28207"],"related":[],"kind":"vulnerability","state":"published","title":"Zen-C Vulnerable to Command Injection via Malicious Output Filename","summary":"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.","summarySource":"cvelist","descriptions":[{"lang":"en","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.","source":"cvelist"},{"lang":"es","text":"Zen C es un lenguaje de programación de sistemas que compila a GNU C/C11 legible por humanos. Antes de la versión 0.4.2, una vulnerabilidad de inyección de comandos (CWE-78) en el compilador Zen C permite a atacantes locales ejecutar comandos de shell arbitrarios proporcionando un nombre de archivo de salida especialmente diseñado a través del argumento de línea de comandos '-o'. La vulnerabilidad existía en la lógica de la aplicación 'main' (específicamente en 'src/main.c'), donde el compilador construía una cadena de comandos de shell para invocar al compilador C de backend. Esta cadena de comandos se construía concatenando varios argumentos, incluyendo el nombre de archivo de salida controlado por el usuario, y posteriormente se ejecutaba usando la función 'system()'. Debido a que 'system()' invoca un shell para analizar y ejecutar el comando, los metacaracteres de shell dentro del nombre de archivo de salida eran interpretados por el shell, lo que llevaba a la ejecución arbitraria de comandos. Un atacante que puede influir en los argumentos de línea de comandos pasados al compilador 'zc' (como a través de un script de compilación o una configuración de pipeline de CI/CD) puede ejecutar comandos arbitrarios con los privilegios del usuario que ejecuta el compilador. La vulnerabilidad ha sido corregida en la versión 0.4.2 eliminando las llamadas a 'system()', implementando 'ArgList' y el manejo interno de argumentos. Se aconseja a los usuarios actualizar a la versión v0.4.2 de Zen C o posterior.","source":"nvd"}],"published":"2026-02-26T22:17:58.898Z","modified":"2026-06-17T10:28:19.953Z","severity":{"scorer":"GitHub_M","scheme":"CVSS:3.1","vector":"CVSS:3.1/AV:L/AC:L/PR:N/UI:R/S:U/C:L/I:H/A:L","score":6.6,"rating":"MEDIUM"},"severities":[{"scorer":"GitHub_M","scheme":"CVSS:3.1","vector":"CVSS:3.1/AV:L/AC:L/PR:N/UI:R/S:U/C:L/I:H/A:L","score":6.6,"rating":"MEDIUM"},{"scorer":"NVD","scheme":"CVSS:3.1","vector":"CVSS:3.1/AV:L/AC:L/PR:L/UI:R/S:U/C:H/I:H/A:H","score":7.3,"rating":"HIGH"}],"cwes":["CWE-78"],"affected":[{"ranges":[{"version":"< 0.4.2","status":"affected"}],"vendor":"z-libs","product":"Zen-C","source":"cvelist"},{"ranges":[{"status":"affected","fixed":"0.4.2"}],"vendor":"zenc-lang","product":"zen_c","cpe":"cpe:2.3:a:zenc-lang:zen_c:*:*:*:*:*:*:*:*","source":"nvd"}],"references":[{"url":"https://github.com/z-libs/Zen-C/security/advisories/GHSA-9rff-x96h-76h2","tags":["exploit","mitigation","vendor-advisory","x-refsource-confirm"],"sources":["cvelist","nvd"]},{"url":"https://f0nduesav0yarde.github.io/blog/vulnerabilities/cve-2026-28207/","tags":["exploit","third-party-advisory"],"sources":["cvelist","nvd"]}],"credits":[],"assigner":"GitHub_M","ssvc":{"scorer":"CISA-ADP","exploitation":"poc","automatable":"no","technicalImpact":"partial","date":"2026-03-02T20:48:05.636Z"},"sources":[{"source":"cvelist","name":"CVE List","id":"CVE-2026-28207","url":"https://www.cve.org/CVERecord?id=CVE-2026-28207","licence":"CVE Terms of Use","modified":"2026-03-02T20:48:09.055Z"},{"source":"nvd","name":"NVD","id":"CVE-2026-28207","url":"https://nvd.nist.gov/vuln/detail/CVE-2026-28207","licence":"Public domain","modified":"2026-06-17T10:28:19.953Z"}],"updatedAt":"2026-11-25T22:59:14.982Z","epss":{"score":0.01064,"percentile":0.65592,"date":"2026-12-01T12:00:22.000Z"}}