/

CVE-2026-22601

Severity:

HIGH RISK

(7.2)

Command Injection in OpenProject Email Configuration

CVE-2026-22601

Analyzed

Vulnerability type

Category:

Command Injection

CWE:

CWE-77

Impact:

Authenticated Remote Code Execution

Severity:

HIGH RISK

(7.2)

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

OpenProject versions 16.6.1 and below contain a command injection vulnerability in the email configuration feature, where the sendmail binary path can be controlled by an administrator.

By setting a malicious sendmail path and triggering a test email, an authenticated admin can execute arbitrary commands on the underlying server.

Affected context

This vulnerability occurs in OpenProject deployments that rely on the application's email configuration interface and allow administrators to customize the sendmail binary path.

It is relevant where:

  • Email is configured using a local sendmail-like binary
  • Application-level administrator accounts exist and are not fully trusted
  • The sendmail path is interpolated into a shell command without robust validation or escaping

Exploit preconditions

  • Attack surface: OpenProject web UI, specifically the admin email configuration panel.
  • Required access: Authenticated OpenProject administrator account (no need for OS-level access).
  • Trigger point: Saving a crafted sendmail binary path and using the "send test email" or equivalent function.
  • Why exploitation is possible: The configured sendmail path is incorporated into a shell command in an unsafe manner, allowing command separators or injected arguments to be interpreted by the OS shell.

Why this happens

The core issue aligns with CWE-77: Improper Neutralization of Special Elements used in a Command ('Command Injection').

User-controlled configuration data (the sendmail executable path) is passed into a system-level command context without strict validation, canonicalization, or avoidance of shell interpretation.

Instead of treating the path as an opaque executable reference, the implementation allows shell metacharacters or additional arguments to be processed, enabling arbitrary command execution in the application's privilege context.

Potential impact

  • Execution of arbitrary OS commands with the permissions of the OpenProject server process
  • Reading, modifying, or deleting application data and configuration
  • Installing backdoors or additional malicious software on the host
  • Pivoting to other internal services reachable from the server
  • Full compromise of the OpenProject instance and potentially the underlying host

General mitigation guidance

Effective mitigation centers on removing shell interpretation from the execution path and constraining configurability:

  • Treat external binary paths as strict filesystem paths, not shell command lines, and avoid invoking them via a shell.
  • Use safe process execution APIs that accept argument arrays and do not perform shell expansion.
  • Validate and normalize configured paths against an allowlist of expected locations or binaries, rejecting anything that is not a valid executable path.
  • Limit the need for highly dynamic configuration of system-level tools; prefer predefined, vetted options where possible.
  • Run the application with least-privilege OS accounts and apply operating system hardening to limit impact if command execution occurs.

How teams detect issues like this

Detection typically involves a combination of code and configuration review:

  • Static analysis: Scan for uses of shell-invoking APIs (e.g., system, popen, backticks, or shell=True patterns) where user or admin-supplied data is concatenated into command strings.
  • Code review: Examine email configuration and outbound mail routines to ensure sendmail paths and similar fields are not incorporated into shell commands or unescaped argument strings.
  • Configuration auditing: Monitor administrative configuration changes involving sendmail or external tool paths, and flag unusual or non-standard values.
  • Runtime monitoring: Use application and system logs to detect abnormal command executions or unexpected processes spawned by the OpenProject service.

Sources

SourceLink
github.comgithub.com/opf/openproject/releases/tag/v16.6.2
github.comgithub.com/opf/openproject/security/advisories/GHSA-9vrv-7h26-c7jc

Frequently asked

questions

Yes, but only by authenticated users with administrative access to the OpenProject web interface. An attacker must be able to log in as an admin and reach the email configuration page.

Exploitation requires a valid OpenProject administrator account. Regular users or unauthenticated attackers cannot directly exploit this flaw without first gaining admin-level credentials.

The safest pattern is to avoid invoking shells with user-controlled data entirely. Use process execution APIs that pass arguments as arrays, enforce strict validation on paths, and restrict configuration to known-safe executables instead of free-form command strings.

Design features so that configuration values are treated as data, not as command fragments, avoid shell interpretation, enforce allowlists and strict validation for any path or command-like input, and include targeted security review for any code that interacts with the operating system or external binaries.

Find out what's already
exploitable in your codebase.