/

CVE-2026-34107

Severity:

CRITICAL RISK

(9.8)

OS Command Injection (CWE-78) in Guardian translate.php

CVE-2026-34107

Deferred

Vulnerability type

Category:

OS Command Injection

CWE:

CWE-78

Impact:

Remote Code Execution

Severity:

CRITICAL RISK

(9.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

Guardian language-system contains an OS command injection flaw where the untrusted id GET parameter is passed directly into a PHP exec() call.

An unauthenticated remote attacker can craft a malicious request that appends shell metacharacters to this parameter, resulting in arbitrary command execution on the server.

Affected context

The vulnerability occurs in the Guardian language-system within translate.php, where a PHP exec() call is built by concatenating user input from the id GET parameter.

It is relevant in deployments where this script is exposed over HTTP, no authentication or access control is enforced, and the underlying PHP process has permission to execute shell commands.

The risk increases in environments where the web server or PHP user has broad system privileges or access to sensitive data and internal network resources.

Exploit preconditions

  • Attack surface: Publicly exposed translate.php endpoint accessible over HTTP/HTTPS.
  • Required access: No authentication; any remote user can send requests with a custom id parameter.
  • Trigger point: The vulnerable exec("php jobs/translate.php ".$login_session." ".$_GET['id']." ...") call on line 14 of translate.php.
  • Why exploitation is possible: The application directly interpolates the unvalidated id parameter into a shell command, allowing attackers to inject shell metacharacters (such as ;, &&, |) that the shell interprets as additional commands, matching CWE-78: Improper Neutralization of Special Elements used in an OS Command.

Why this happens

The root cause is the insecure construction of shell commands by string-concatenating untrusted HTTP parameters into a call to PHP's exec() function.

No sanitization, escaping, or validation is applied to the id parameter, and the code relies on the shell to interpret the final command line string.

This pattern aligns with CWE-78, where special elements (shell metacharacters) in untrusted input are not properly neutralized before inclusion in OS-level commands, enabling attackers to break out of intended arguments and execute arbitrary commands.

Potential impact

  • Remote execution of arbitrary OS commands under the PHP/web server user context.
  • Reading, modifying, or deleting application data and configuration files.
  • Planting webshells or backdoors to maintain long-term access.
  • Pivoting into internal networks reachable from the affected server.
  • Exfiltration of credentials, API keys, and other secrets stored on the system.
  • Full server takeover if the PHP/web server user has elevated privileges.

General mitigation guidance

Effective mitigation focuses on avoiding direct shell invocation with user-controlled input and constraining any necessary command execution.

Recommended defensive patterns include:

  • Replacing exec() and other shell-based functions with safer, high-level APIs or language-native functions that do not invoke a shell.
  • If command-line tools must be used, building argument lists using APIs that bypass the shell and treating each argument as a separate parameter.
  • Strictly validating the id parameter against an allowlist of expected formats (for example, numeric IDs or predefined tokens) and rejecting any value that does not conform.
  • Applying least-privilege principles to the web server and PHP runtime so that, even if a command is executed, the resulting damage is constrained.
  • Centralizing and reviewing any command-execution logic to ensure consistent sanitization and secure patterns across the application.

How teams detect issues like this

Detection efforts can combine code-level inspection with runtime monitoring:

  • Static analysis rules targeting PHP functions such as exec, system, shell_exec, passthru, and backtick operators when concatenated with $_GET, $_POST, or other superglobals.
  • Manual code reviews that flag any dynamic shell command construction, especially where user input is concatenated into command strings without validation or escaping.
  • Secure coding policies that require justification and security review for any OS command execution in web-exposed code paths.
  • Runtime monitoring and logging to detect suspicious command patterns, unexpected child processes, or anomalous behavior originating from the web server process.
  • Integration of automated SAST/DAST tools into CI/CD pipelines to regularly scan for command injection patterns and regressions.

Sources

SourceLink
gist.github.comgist.github.com/cyberinforepo/d5b2771d82e1b31b8fc1c33052e08dad
vulncheck.comvulncheck.com/advisories/guardian-language-system-unauthenticated-os-command-injection-via-id-parameter-in-translate-php

Frequently asked

questions

Yes. Because the vulnerable script accepts the id parameter over HTTP without authentication, a remote attacker can exploit it by sending crafted requests to the affected endpoint.

No. The vulnerability description specifies that no authentication is required; any user who can reach the translate.php endpoint can attempt exploitation.

The most robust fix is to remove direct shell command execution from this code path altogether and replace it with safer, language-native mechanisms that do not invoke a shell or interpret user input as part of a command line.

Prevention relies on enforcing strict input validation, avoiding shell execution of user-influenced data, using APIs that pass arguments without a shell, and reviewing any new use of dangerous functions through security-focused code review and automated static analysis.

Find out what's already
exploitable in your codebase.