/

CVE-2026-48547

Severity:

HIGH RISK

(7.3)

Command Injection (CWE-78) in KanaDojo Release Workflow

CVE-2026-48547

Deferred

Vulnerability type

Category:

Command Injection

CWE:

CWE-78

Impact:

Remote Code Execution in CI/CD Pipeline

Severity:

HIGH RISK

(7.3)

CVSS version:

3.1

Catch this CVE while code is being written

Detect vulnerable code directly in pull requests, so CVEs are fixed before merge.

Summary

KanaDojo's GitHub Actions release workflow is vulnerable to command injection when values from patchNotesData.json are interpolated directly into a child_process.execSync() shell command.

An attacker with pull request access can craft malicious version or changes fields that, once merged, execute arbitrary commands on the Actions runner with contents write permissions and access to GITHUB_TOKEN.

Affected context

This vulnerability appears in the KanaDojo project's automated release pipeline, specifically within a GitHub Actions workflow (release.yml) that runs on merged pull requests.

The workflow reads user-controlled fields (such as version and changes) from patchNotesData.json and embeds them directly into a shell command executed via child_process.execSync().

The issue manifests when the CI runner is granted write access to the repository contents and uses the default GITHUB_TOKEN for subsequent API or git operations.

Exploit preconditions

  • Attack surface: CI/CD (GitHub Actions) release workflow triggered on pull request merge
  • Required access: Ability to open a pull request that modifies patchNotesData.json (e.g., contributor-level access)
  • Trigger point: Execution of the release.yml workflow, which calls child_process.execSync() with interpolated data from patchNotesData.json
  • Why exploitation is possible: User-supplied fields (version and/or changes) are inserted into a shell command without escaping, quoting, or validation, allowing shell metacharacters to alter the intended command and inject arbitrary commands

Why this happens

The core issue is the direct interpolation of untrusted data into a shell command executed by child_process.execSync().

This pattern falls under CWE-78: Improper Neutralization of Special Elements used in an OS Command ('OS Command Injection'), where input that should be treated as data is instead interpreted by the shell as part of the command.

By failing to sanitize or strictly validate the version and changes fields from patchNotesData.json, and by using a shell-based execution API instead of argument-safe process spawning, the workflow allows attackers to introduce shell metacharacters that change the behavior of the command executed on the CI runner.

Potential impact

  • Execution of arbitrary OS commands on the GitHub Actions runner
  • Modification or deletion of repository contents via contents write permissions
  • Abuse of GITHUB_TOKEN to create or modify releases, tags, or pull requests
  • Exfiltration of repository data or workflow secrets accessible to the job
  • Tampering with build artifacts or release assets in the pipeline

General mitigation guidance

Effective mitigation centers on removing the trust boundary violation between user-controlled data and shell commands.

Common defensive patterns include:

  • Avoiding shell-based execution for dynamic values by using safer APIs (e.g., child_process.spawn with explicit argument arrays, or dedicated library calls) instead of exec/execSync
  • Treating values from patchNotesData.json as data only and never as part of shell syntax; enforcing strict validation and whitelisting on version strings and change descriptions
  • Applying robust escaping or quoting routines if interaction with a shell is unavoidable, ensuring shell metacharacters are neutralized
  • Reducing CI job privileges by limiting GITHUB_TOKEN scopes and disabling unnecessary write permissions where possible
  • Isolating release automation steps that rely on untrusted inputs and running them in contexts that lack sensitive credentials or write access

How teams detect issues like this

Organizations can identify similar issues by:

  • Using static analysis or linters that flag unsafe usage of child_process.exec/execSync with interpolated or concatenated strings derived from user or file input
  • Reviewing CI/CD configuration (e.g., GitHub Actions YAML) for commands that inject JSON or other user-controlled content into shell pipelines without validation
  • Implementing secure coding guidelines and code review checklists that require justification for any shell invocation in automation scripts
  • Enforcing security-focused checks in pull request workflows, including pattern-based scanning for command injection risks and over-privileged GITHUB_TOKEN configurations

Sources

SourceLink
github.comgithub.com/lingdojo/kana-dojo/commit/31b85a5d7c4b323ddeba3b2dc5e7807558710544
github.comgithub.com/lingdojo/kana-dojo/releases/tag/v0.1.18

Frequently asked

questions

Exploitation occurs within the GitHub Actions environment, not directly against production systems; however, attackers can leverage the CI runner's permissions to affect code, releases, or artifacts, which may indirectly impact downstream environments.

The attacker must be able to create or influence a pull request that modifies patchNotesData.json so that the malicious version or changes fields are merged and subsequently processed by the release workflow.

Replace shell-based execSync calls that embed user-controlled data with safer process execution patterns or dedicated library calls, and ensure any remaining inputs are rigorously validated and treated strictly as data, not as command fragments.

Establish secure CI/CD coding standards that prohibit direct interpolation of untrusted input into shell commands, require minimal token scopes and permissions for automation, and integrate static analysis or policy checks to catch command injection patterns before workflows are merged.

Find out what's already
exploitable in your codebase.