{"id":"CVE-2026-28207","sourceIdentifier":"security-advisories@github.com","published":"2026-02-26T23:16:35.277","lastModified":"2026-06-17T10:28:19.953","vulnStatus":"Analyzed","cveTags":[],"descriptions":[{"lang":"en","value":"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."},{"lang":"es","value":"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."}],"affected":[{"source":"security-advisories@github.com","affectedData":[{"vendor":"z-libs","product":"Zen-C","versions":[{"version":"< 0.4.2","status":"affected"}]}]}],"metrics":{"cvssMetricV31":[{"source":"security-advisories@github.com","type":"Secondary","cvssData":{"version":"3.1","vectorString":"CVSS:3.1/AV:L/AC:L/PR:N/UI:R/S:U/C:L/I:H/A:L","baseScore":6.6,"baseSeverity":"MEDIUM","attackVector":"LOCAL","attackComplexity":"LOW","privilegesRequired":"NONE","userInteraction":"REQUIRED","scope":"UNCHANGED","confidentialityImpact":"LOW","integrityImpact":"HIGH","availabilityImpact":"LOW"},"exploitabilityScore":1.8,"impactScore":4.7},{"source":"nvd@nist.gov","type":"Primary","cvssData":{"version":"3.1","vectorString":"CVSS:3.1/AV:L/AC:L/PR:L/UI:R/S:U/C:H/I:H/A:H","baseScore":7.3,"baseSeverity":"HIGH","attackVector":"LOCAL","attackComplexity":"LOW","privilegesRequired":"LOW","userInteraction":"REQUIRED","scope":"UNCHANGED","confidentialityImpact":"HIGH","integrityImpact":"HIGH","availabilityImpact":"HIGH"},"exploitabilityScore":1.3,"impactScore":5.9}],"ssvcV203":[{"source":"134c704f-9b21-4f2e-91b3-4a467353bcc0","ssvcData":{"timestamp":"2026-03-02T20:48:05.636087Z","id":"CVE-2026-28207","options":[{"exploitation":"poc"},{"automatable":"no"},{"technicalImpact":"partial"}],"role":"CISA Coordinator","version":"2.0.3"}}]},"weaknesses":[{"source":"security-advisories@github.com","type":"Secondary","description":[{"lang":"en","value":"CWE-78"}]}],"configurations":[{"nodes":[{"operator":"OR","negate":false,"cpeMatch":[{"vulnerable":true,"criteria":"cpe:2.3:a:zenc-lang:zen_c:*:*:*:*:*:*:*:*","versionEndExcluding":"0.4.2","matchCriteriaId":"E084A39F-FF3F-487E-8E8A-F8F3C322A5AE"}]}]}],"references":[{"url":"https://github.com/z-libs/Zen-C/security/advisories/GHSA-9rff-x96h-76h2","source":"security-advisories@github.com","tags":["Exploit","Mitigation","Vendor Advisory"]},{"url":"https://f0nduesav0yarde.github.io/blog/vulnerabilities/cve-2026-28207/","source":"af854a3a-2127-422b-91ae-364da2661108","tags":["Exploit","Third Party Advisory"]},{"url":"https://github.com/z-libs/Zen-C/security/advisories/GHSA-9rff-x96h-76h2","source":"134c704f-9b21-4f2e-91b3-4a467353bcc0","tags":["Exploit","Mitigation","Vendor Advisory"]}]}