/

CVE-2026-132756

Severity:

HIGH RISK

(7.8)

OS Command Injection (CWE-78) in Geany Build Commands

CVE-2026-132756

Awaiting Analysis

Vulnerability type

Category:

OS Command Injection

CWE:

CWE-78

Impact:

Code execution with the privileges of the user running the command

Severity:

HIGH RISK

(7.8)

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

Geany can pass filenames containing shell metacharacters into build or execution commands in a way that allows those characters to be interpreted by the shell. If a user runs Compile, Build, or Execute on a crafted filename, commands may run with that user's privileges.

Affected context

The vulnerability occurs when Geany substitutes a filename into a build or execution command that is interpreted by /bin/sh. It becomes risky when a crafted filename is available to the user and the user triggers Compile, Build, or Execute for that file.

Exploit preconditions

  • Attack surface: Geany's Compile, Build, and Execute command handling
  • Required access: The attacker must make a crafted filename available to a Geany user; the user must be able to open or access it
  • Trigger point: The user runs a build or execution action that uses the filename
  • Why exploitation is possible: Shell metacharacters in the substituted filename may be interpreted as command syntax

Why this happens

The underlying issue is OS command injection, mapped to CWE-78. The insecure pattern is incorporating a filename into a shell command without reliably preventing shell interpretation. As a result, data intended to identify a file may be treated as part of the command.

Potential impact

  • An attacker may execute commands with the affected user's privileges
  • The user's files and data could be accessed or modified, subject to their permissions
  • Malware or other unwanted software could be run in the user's session

General mitigation guidance

Mitigation generally focuses on avoiding shell interpretation of externally influenced values.

  • Prefer APIs that pass executable arguments directly rather than constructing shell command strings
  • Treat filenames and other externally influenced values as untrusted, and use robust argument handling where shell invocation cannot be avoided
  • Use fixed, allowlisted command structures and avoid unnecessary dynamic command construction
  • Apply least privilege to user accounts and development environments

How teams detect issues like this

  • Use static analysis to identify shell command construction that incorporates filenames or other externally influenced values
  • Review build and execution command templates for unsafe interpolation and missing argument handling
  • Apply code-review policies that require safer process invocation patterns
  • Consider automated security review tools that flag command-injection risks

Sources

SourceLink
github.comgithub.com/geany/geany/blob/2.1.0/src/build.c#L1100-L1111
github.comgithub.com/geany/geany/blob/2.1.0/src/utils.c#L2561-L2610
github.comgithub.com/geany/geany/issues/4611
vulncheck.comvulncheck.com/advisories/geany-through-2.1.0-os-command-injection-via-filename-in-build-commands

Frequently asked

questions

Compile, Build, or Execute actions may trigger it when a filename is substituted into a shell command.

The attacker needs to make a crafted filename available to a Geany user. That user must then run an affected action on the file.

Avoid constructing shell command strings from filenames. Prefer direct process invocation with arguments handled separately.

Treat filenames as untrusted input, review command-building paths, and use static analysis and code-review policies to identify unsafe shell invocation patterns.

Find out what's already
exploitable in your codebase.