OS Command InjectionWeakness · CWE-78

CVE-2026-31226

CRITICAL · 9.8 CVSS v3.1 Published 2026-05-12
Mitigation only
No fix yet — a mitigation exists. There is no fixed release. A documented workaround reduces exposure in the meantime.
See remediation →
100/100
Remediation priority · Urgent
Remotely reachable No privileges Zero-click

Official description Straight from the sourceThe vendor's or NVD's own wording, published unedited. Authoritative, but often terse — it says what broke, rarely what to do.

NVD · unedited
The TinyZero project thru commit 6652a63c57fa7e5ccde3fc9c598c7176ff15b839 (2025-58-24) contains a critical command injection vulnerability (CWE-78) in its HDFS file operation utilities. The vulnerability arises from the unsafe construction and execution of shell commands via os.system() without proper input sanitization or escaping. User-controlled input (such as file paths) is directly interpolated into shell command strings using f-strings within the _copy() function. An attacker can inject arbitrary OS commands by supplying a specially crafted path parameter through the Hydra configuration framework. This leads to remote code execution with the privileges of the user running the TinyZero training process.

Technical summary Written by usOur analysis, written from the advisory, the CVSS vector and the affected-version data. It adds context the advisory leaves out, and never invents facts that are not in the source.

dbcve analysis · high confidence

The TinyZero project contains a critical command injection vulnerability (CWE-78) in its HDFS file operation utilities. The _copy() function uses f-strings to interpolate user-controlled file paths directly into shell commands executed via os.system() without any sanitization or escaping. An attacker can inject arbitrary OS commands by supplying specially crafted path parameters through the Hydra configuration framework, leading to remote code execution.

MitigationReplace os.system() calls with subprocess module using shell=False, implement proper input validation and escaping for path parameters, or use library-level HDFS operations instead of shell commands.

Verify against the referenced sources before acting — the references below are authoritative for this CVE, this summary is not.

CVSS breakdown How the score is builtThe industry scoring standard. It rates how the flaw is reached, what it takes to exploit, and what an attacker gains — the score is derived from those, not the other way round.

From the vector
Attack vector
Network
Complexity
Low
Privileges
None
User interaction
None
Scope
Unchanged
Confidentiality
High
Integrity
High
Availability
High

CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H

Am I affected? How to checkSteps we derive from the advisory and the affected-version data, so you can decide whether this CVE reaches your setup. They are a guide, not a scan — your own configuration is the authority.

dbcve checks

Work through these to decide whether this CVE applies to you.

  1. Locate TinyZero installation and version
    Run 'pip show tinyzero' or check your project dependencies to confirm TinyZero is installed and note its version number
    Affected if TinyZero is present and the version lacks the command injection fix
  2. Find the HDFS utility module containing _copy()
    Search the TinyZero codebase for files named 'hdfs' or containing 'def _copy' - typically in utils/file_operations.py or similar
    Affected if The _copy() function exists in your TinyZero installation
  3. Inspect _copy() for vulnerable os.system() usage
    Open the HDFS utility file and examine the _copy() function body - look for os.system() calls with f-strings or format() that embed path variables directly into shell commands
    Affected if The function uses os.system() with unsanitized path interpolation (e.g., os.system(f'hdfs dfs -cp {src} {dst}'))
  4. Verify Hydra configuration framework is in use
    Check project dependencies (requirements.txt, pyproject.toml) for 'hydra' or 'hydra-core' and examine config files in conf/ directories
    Affected if Hydra is used to configure file path parameters that could reach the vulnerable _copy() function
  5. Confirm HDFS operations are exposed via user-controlled paths
    Review your application code to see if file path parameters flow from Hydra config through to the _copy() function without validation
    Affected if User-supplied or config-supplied paths can reach the vulnerable _copy() method

You are affected if TinyZero with a vulnerable _copy() function using os.system() is deployed and user-controlled paths from Hydra configuration can reach that function.

Generated from the published advisory. Verify against your own configuration.

Check your environment

Paste your version and any relevant configuration and it will be compared against the affected criteria above. Do not include secrets or credentials.

AI-assisted, checked against the advisory. Informational, not a guarantee.

Remediation Closing itWhat it takes to close this. Where a vendor fix exists we point at it; where none exists we say so plainly, and can build one. Effort estimates are scoped from the advisory, not from your codebase.

From vendor data
Mitigation available No clean upgrade yet — mitigate in the meantime
Mitigation

Replace os.system() calls with subprocess module using shell=False, implement proper input validation and escaping for path parameters, or use library-level HDFS operations instead of shell commands.

Have this fixed Scoped from the published advisory
  • Consultation4.0 h
  • Implementation8.0 h
  • Testing4.0 h
  • Review / QA3.0 h
19.0 hours of engineering $3,380
Get help mitigating

An estimate, not a bill — we confirm scope with you before any work starts. Need it this week? Rush from $5,408.

Scan for this in your stack

Free · runs locally
dbcve dependency scanner

Check whether your project pulls in CVE-2026-31226 — or any other known-vulnerable package — straight from your lock files. Free and open source; it runs locally and uploads nothing.

References Go to the primary sourcePrimary sources — vendor advisories, patches and trackers. Where our summary and a reference disagree, the reference wins.

Primary sources

Practitioner notes

Contributed

Peer-ranked notes from engineers who’ve handled CVE-2026-31226 in production — separate from our analysis above.

No notes yet

Be the first to add a field note for this CVE — a mitigation you’ve verified, a version caveat, or a link to a working fix. Sign in above to contribute.

What this is

A place for practitioners to share what actually worked: a mitigation you’ve tested, a configuration change, a version- or environment-specific caveat, or a link to a verified patch. The most useful notes rise to the top as peers upvote them, so the signal stays high.

What belongs here
  • Verified mitigations, workarounds, and config changes
  • Version or environment caveats, and links to real fixes
  • No weaponised exploit code, or anything meant to cause harm
  • No spam, self-promotion, credentials, or personal data