CVE-2026-28207

Source
https://cve.org/CVERecord?id=CVE-2026-28207
Import Source
https://storage.googleapis.com/cve-osv-conversion/osv-output/CVE-2026-28207.json
JSON Data
https://api.osv.dev/v1/vulns/CVE-2026-28207
Aliases
  • GHSA-9rff-x96h-76h2
Published
2026-02-26T22:17:58.898Z
Modified
2026-04-10T05:42:55.160339Z
Severity
  • 6.6 (Medium) CVSS_V3 - CVSS:3.1/AV:L/AC:L/PR:N/UI:R/S:U/C:L/I:H/A:L CVSS Calculator
Summary
Zen-C Vulnerable to Command Injection via Malicious Output Filename
Details

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.

Database specific
{
    "cna_assigner": "GitHub_M",
    "cwe_ids": [
        "CWE-78"
    ],
    "osv_generated_from": "https://github.com/CVEProject/cvelistV5/tree/main/cves/2026/28xxx/CVE-2026-28207.json"
}
References

Affected packages

Git / github.com/z-libs/zen-c

Affected ranges

Type
GIT
Repo
https://github.com/z-libs/zen-c
Events
Introduced
0 Unknown introduced commit / All previous commits are affected
Fixed
Database specific
{
    "versions": [
        {
            "introduced": "0"
        },
        {
            "fixed": "0.4.2"
        }
    ]
}

Affected versions

v0.*
v0.1.0
v0.1.1
v0.1.2
v0.1.3
v0.1.3b
v0.4.0
v0.4.1

Database specific

source
"https://storage.googleapis.com/cve-osv-conversion/osv-output/CVE-2026-28207.json"

Git / github.com/zenc-lang/zenc

Affected ranges

Type
GIT
Repo
https://github.com/zenc-lang/zenc
Events
Introduced
0 Unknown introduced commit / All previous commits are affected
Fixed
Database specific
{
    "versions": [
        {
            "introduced": "0"
        },
        {
            "fixed": "0.4.2"
        }
    ]
}

Affected versions

v0.*
v0.1.0
v0.1.1
v0.1.2
v0.1.3
v0.1.3b
v0.4.0
v0.4.1

Database specific

source
"https://storage.googleapis.com/cve-osv-conversion/osv-output/CVE-2026-28207.json"