/

CVE-2026-79916

Severity:

CRITICAL RISK

(9.1)

OS Command Injection (CWE-78) in MaxKB AWS Config Files

CVE-2026-79916

Deferred

Vulnerability type

Category:

OS Command Injection

CWE:

CWE-78

Impact:

Remote Code Execution

Severity:

CRITICAL RISK

(9.1)

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

MaxKB contains an OS command injection vulnerability in its AWS Bedrock credential configuration workflow. An authenticated workspace member may manipulate credential fields so that a later profile selection causes botocore to execute attacker-controlled commands with the application's privileges, potentially including root.

Affected context

The issue occurs in MaxKB deployments that support AWS Bedrock credentials and persist those credentials to the standard AWS configuration location. It becomes risky when an authenticated workspace member can supply control characters in credential fields and the resulting configuration is later consumed by botocore without safe handling or strict normalization.

Exploit preconditions

  • Attack surface: MaxKB's authenticated workspace and AWS Bedrock credential-management functionality
  • Required access: Authenticated membership in a workspace with permission to configure or update AWS credentials
  • Trigger point: A later model-validation or AWS client operation that loads the manipulated AWS profile
  • Why exploitation is possible: Unsafely handled credential input can alter the generated AWS configuration and enable execution of a configured credential-process command
  • Privilege context: The command may run with the privileges of the MaxKB service, which can be highly privileged in some deployments

Why this happens

The vulnerability results from writing attacker-influenced credential values into an AWS configuration file without treating control characters and configuration boundaries as untrusted input. This can allow data intended as a credential value to introduce additional profile settings, including executable credential-provider directives. When botocore loads the altered profile, it may invoke the configured process, mapping the behavior to CWE-78: Improper Neutralization of Special Elements used in an OS Command.

Potential impact

  • An attacker may execute arbitrary operating-system commands in the MaxKB runtime
  • Commands could run with root or another highly privileged service identity
  • Application data, model configuration, or stored credentials could be accessed or modified
  • The host or container environment could be used for persistence or lateral movement
  • An attacker could disrupt AI assistant availability or alter workspace behavior

General mitigation guidance

Mitigation generally focuses on preventing user-controlled values from becoming executable AWS configuration directives.

Common defensive patterns include:

  • Treating credential fields strictly as opaque data and rejecting control characters, delimiters, and unexpected configuration syntax
  • Avoiding direct string construction for shared configuration files; use safe structured APIs or tightly controlled serialization
  • Allowing only explicitly supported AWS profile settings and excluding executable provider mechanisms where they are not required
  • Separating application-managed credentials from user-managed AWS configuration and using narrowly scoped credential sources
  • Running the service with a dedicated least-privilege identity, avoiding root where practical, and restricting filesystem and process permissions
  • Applying secret-management controls so long-lived access keys are not unnecessarily written to local configuration files

How teams detect issues like this

Detection can combine code analysis, configuration monitoring, and runtime controls:

  • Use static analysis to identify concatenation or interpolation of user-controlled values into AWS configuration files
  • Review code for credential-field handling that fails to reject control characters or profile delimiters
  • Monitor writes to AWS credential and configuration paths, especially changes that introduce process-based credential providers
  • Apply policy checks that prohibit executable credential-provider settings in application-managed profiles
  • Alert on unexpected child processes launched by the MaxKB service or its model-validation workflows
  • Use automated code-review tools to flag command construction, unsafe configuration serialization, and insufficient input normalization

Sources

SourceLink
github.comgithub.com/1Panel-dev/MaxKB/commit/a1e413d196004421ab0953ee0baa13d4ca0fe3c4
github.comgithub.com/1Panel-dev/MaxKB/pull/6418
github.comgithub.com/1Panel-dev/MaxKB/releases/tag/v2.10.5-lts
github.comgithub.com/1Panel-dev/MaxKB/security/advisories/GHSA-2324-7xjr-9qxg

Frequently asked

questions

It can be exploitable through MaxKB's application interface when an attacker has authenticated workspace access and the relevant AWS Bedrock credential-management functionality is enabled. It is not necessarily an unauthenticated attack.

The attacker generally needs authenticated workspace membership with permission to submit or update AWS credential settings. The exact scope depends on the deployment's authorization model.

Ensure credential values cannot modify configuration structure or enable executable credential providers. Prefer safe structured configuration handling, strict allowlists, and non-root service execution.

Treat all user-supplied configuration as untrusted, validate it before persistence, monitor sensitive configuration paths, restrict process-spawning capabilities, and enforce least privilege throughout the application and runtime environment.

Find out what's already
exploitable in your codebase.