/

CVE-2026-107204

Severity:

CRITICAL RISK

(9.8)

Missing Authentication (CWE-306) in LMCache /run_script

CVE-2026-107204

Deferred

Vulnerability type

Category:

Missing Authentication

CWE:

CWE-306

Impact:

Unauthenticated 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

LMCache through version 0.5.5 exposes the /run_script endpoint without sufficient authentication, allowing remote attackers to submit Python code for execution.

Because the endpoint can be reached without valid credentials, an attacker may execute operating-system commands with the privileges of the LMCache process.

LMCache through version 0.5.5 exposes the /run_script endpoint without sufficient authentication, allowing remote attackers to submit Python code for execution.

Because the endpoint can be reached without valid credentials, an attacker may execute operating-system commands with the privileges of the LMCache process.

Affected context

The vulnerability occurs in LMCache deployments that expose the FastAPI-based /run_script endpoint to an attacker and do not place effective authentication or network restrictions in front of it. Risk is higher when the service is reachable from untrusted networks or runs with access to sensitive files, credentials, model data, or other internal services.

The vulnerability occurs in LMCache deployments that expose the FastAPI-based /run_script endpoint to an attacker and do not place effective authentication or network restrictions in front of it. Risk is higher when the service is reachable from untrusted networks or runs with access to sensitive files, credentials, model data, or other internal services.

Exploit preconditions

  • Attack surface: Network-accessible LMCache /run_script endpoint
  • Required access: No valid authentication is required when the endpoint is exposed
  • Trigger point: Submission of a script to the endpoint
  • Why exploitation is possible: The endpoint accepts attacker-controlled Python code and provides an application context from which restricted functionality can be recovered, enabling operating-system command execution
  • Attack surface: Network-accessible LMCache /run_script endpoint
  • Required access: No valid authentication is required when the endpoint is exposed
  • Trigger point: Submission of a script to the endpoint
  • Why exploitation is possible: The endpoint accepts attacker-controlled Python code and provides an application context from which restricted functionality can be recovered, enabling operating-system command execution

Why this happens

The underlying issue is a missing authentication control on a security-sensitive code-execution endpoint. The service treats requests to /run_script as authorized without reliably verifying the caller's identity or permissions, mapping to CWE-306: Missing Authentication for Critical Function. Exposing an interpreter-backed operation through an unauthenticated HTTP route creates a direct path from remote input to process-level code execution.

The underlying issue is a missing authentication control on a security-sensitive code-execution endpoint. The service treats requests to /run_script as authorized without reliably verifying the caller's identity or permissions, mapping to CWE-306: Missing Authentication for Critical Function. Exposing an interpreter-backed operation through an unauthenticated HTTP route creates a direct path from remote input to process-level code execution.

Potential impact

  • An unauthenticated attacker may execute arbitrary Python code in the LMCache process
  • The attacker could run operating-system commands with the service account's privileges
  • Sensitive files, environment variables, credentials, or cached data may be exposed
  • The host or container could be used for lateral movement or further compromise
  • Model-serving availability and integrity could be disrupted
  • An unauthenticated attacker may execute arbitrary Python code in the LMCache process
  • The attacker could run operating-system commands with the service account's privileges
  • Sensitive files, environment variables, credentials, or cached data may be exposed
  • The host or container could be used for lateral movement or further compromise
  • Model-serving availability and integrity could be disrupted

General mitigation guidance

Mitigation generally centers on removing unauthenticated access to interpreter-backed functionality and reducing the service's trust and privilege boundaries.

Common defensive patterns include:

  • Disabling or removing script-execution endpoints when they are not essential
  • Enforcing strong authentication and authorization before any administrative or execution function
  • Restricting management interfaces to trusted networks through segmentation and policy enforcement
  • Running the service with a dedicated least-privileged identity and minimal filesystem and network permissions
  • Avoiding exposure of application objects or interpreter capabilities to request handlers
  • Applying secure-by-default deployment configurations that bind administrative interfaces privately
  • Separating code-execution or maintenance workflows from publicly reachable application paths

Mitigation generally centers on removing unauthenticated access to interpreter-backed functionality and reducing the service's trust and privilege boundaries.

Common defensive patterns include:

  • Disabling or removing script-execution endpoints when they are not essential
  • Enforcing strong authentication and authorization before any administrative or execution function
  • Restricting management interfaces to trusted networks through segmentation and policy enforcement
  • Running the service with a dedicated least-privileged identity and minimal filesystem and network permissions
  • Avoiding exposure of application objects or interpreter capabilities to request handlers
  • Applying secure-by-default deployment configurations that bind administrative interfaces privately
  • Separating code-execution or maintenance workflows from publicly reachable application paths

How teams detect issues like this

Organizations can look for this weakness through:

  • Static analysis and code review rules identifying unauthenticated routes that invoke interpreters, subprocesses, dynamic evaluation, or script runners
  • Review of FastAPI route dependencies to confirm authentication and authorization are consistently enforced
  • Configuration and infrastructure scans for publicly reachable LMCache management endpoints
  • Web and application logs showing requests to /run_script, especially from unexpected sources or without an authenticated identity
  • Network policy checks confirming that administrative endpoints are limited to approved clients
  • Automated security review tools that flag exposed code-execution functionality and missing route guards

Organizations can look for this weakness through:

  • Static analysis and code review rules identifying unauthenticated routes that invoke interpreters, subprocesses, dynamic evaluation, or script runners
  • Review of FastAPI route dependencies to confirm authentication and authorization are consistently enforced
  • Configuration and infrastructure scans for publicly reachable LMCache management endpoints
  • Web and application logs showing requests to /run_script, especially from unexpected sources or without an authenticated identity
  • Network policy checks confirming that administrative endpoints are limited to approved clients
  • Automated security review tools that flag exposed code-execution functionality and missing route guards

Sources

SourceLink
github.comgithub.com/LMCache/LMCache
github.comgithub.com/LMCache/LMCache/blob/v0.5.5/lmcache/v1/internal_api_server/common/run_script_api.py#L54-L76
github.comgithub.com/LMCache/LMCache/blob/v0.5.5/lmcache/v1/multiprocess/http_apis/common_api.py#L41-L46
github.comgithub.com/LMCache/LMCache/issues/5510
vulncheck.comvulncheck.com/advisories/lmcache-through-0.5.5-unauthenticated-rce-via-run-script-endpoint

Frequently asked

questions

Yes. When the affected endpoint is reachable over a network without effective access controls, a remote attacker may submit code without first authenticating.

The attacker generally needs network connectivity to the exposed /run_script endpoint. Valid credentials are not required when the endpoint lacks authentication.

Remove unnecessary script-execution functionality or place it behind strong authentication, explicit authorization, and restrictive network controls. The service should also run with minimal privileges.

Treat administrative and interpreter-backed endpoints as privileged operations, require authentication and authorization by default, restrict their network exposure, and continuously test route policies during code review and deployment validation.

Yes. When the affected endpoint is reachable over a network without effective access controls, a remote attacker may submit code without first authenticating.

The attacker generally needs network connectivity to the exposed /run_script endpoint. Valid credentials are not required when the endpoint lacks authentication.

Remove unnecessary script-execution functionality or place it behind strong authentication, explicit authorization, and restrictive network controls. The service should also run with minimal privileges.

Treat administrative and interpreter-backed endpoints as privileged operations, require authentication and authorization by default, restrict their network exposure, and continuously test route policies during code review and deployment validation.

Find out what's already
exploitable in your codebase.