CVE-2026-28207
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
Description
CVSS Scores
EPSS Scores
| Probability: | |
| Percentile: |
Meta Information
Affected Vendors & Products
| Vendor | Product | Version / Range |
|---|---|---|
| zenc-lang | zen_c | to 0.4.2 (exc) |
Helpful Resources
Exploitability
| 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.