CVE-2026-28207
Received Received - Intake
Command Injection in Zen C Compiler via Output Filename Argument

Publication date: 2026-02-26

Last updated on: 2026-05-01

Assigner: GitHub, Inc.

Description
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.
CVSS Scores
EPSS Scores
Probability:
Percentile:
Meta Information
Published
2026-02-26
Last Modified
2026-05-01
Generated
2026-05-27
AI Q&A
2026-02-27
EPSS Evaluated
2026-05-25
NVD
EUVD
Affected Vendors & Products
Showing 1 associated CPE
Vendor Product Version / Range
zenc-lang zen_c to 0.4.2 (exc)
Helpful Resources
Exploitability
CWE
CWE Icon
KEV
KEV Icon
CWE ID Description
CWE-78 The product constructs all or part of an OS command using externally-influenced input from an upstream component, but it does not neutralize or incorrectly neutralizes special elements that could modify the intended OS command when it is sent to a downstream component.
Attack-Flow Graph
AI Powered Q&A
Can you explain this vulnerability to me?

This vulnerability exists in the Zen C compiler prior to version 0.4.2. It is a command injection vulnerability (CWE-78) that allows local attackers to execute arbitrary shell commands. The issue arises because the compiler constructs a shell command string by concatenating user-controlled input, specifically the output filename provided via the '-o' command-line argument. This command string is then executed using the system() function, which invokes a shell. If the output filename contains shell metacharacters, they are interpreted by the shell, enabling arbitrary command execution.

An attacker who can influence the command-line arguments passed to the Zen C compiler, such as through a build script or CI/CD pipeline configuration, can exploit this vulnerability to run commands with the privileges of the user running the compiler.

The vulnerability was fixed in version 0.4.2 by removing system() calls and implementing safer internal argument handling.


How can this vulnerability impact me? :

This vulnerability can allow an attacker with local access to execute arbitrary shell commands on your system with the same privileges as the user running the Zen C compiler.

If an attacker can control the output filename argument (for example, via a compromised build script or CI/CD pipeline), they could execute malicious commands, potentially leading to unauthorized access, data modification, or disruption of services.

The impact includes potential loss of data integrity, confidentiality, and availability depending on the commands executed by the attacker.


How does this vulnerability affect compliance with common standards and regulations (like GDPR, HIPAA)?:

I don't know


How can this vulnerability be detected on my network or system? Can you suggest some commands?

I don't know


What immediate steps should I take to mitigate this vulnerability?

To mitigate this vulnerability, users should update the Zen C compiler to version 0.4.2 or later, where the issue has been fixed by removing unsafe system() calls and improving internal argument handling.


Ask Our AI Assistant
Need more information? Ask your question to get an AI reply (Powered by our expertise)
0/70
EPSS Chart