/

CVE-2026-85694

Severity:

HIGH RISK

(8.1)

Code Injection (CWE-94) in LaVague Python Extractor

CVE-2026-85694

Deferred

Vulnerability type

Category:

Code Injection

CWE:

CWE-94

Impact:

Remote Code Execution

Severity:

HIGH RISK

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

LaVague 0.2.35 evaluates untrusted Python code generated from language-model output that is influenced by web page content. An attacker who controls or can alter content processed by the extractor may use indirect prompt injection to execute arbitrary code on the operator's host without an additional review step.

Affected context

The vulnerability occurs in LaVague's PythonFromMarkdownExtractor.extract_as_object when it processes model-generated output derived from web content. Risk is higher when an operator or automated workflow retrieves attacker-influenced pages, allows model output to reach the extractor, and runs the resulting code with meaningful host permissions.

Exploit preconditions

  • Attack surface: Web content ingestion followed by language-model-assisted extraction
  • Required access: The attacker needs to influence content that the LaVague workflow retrieves or processes
  • Trigger point: Processing model output through PythonFromMarkdownExtractor.extract_as_object
  • Why exploitation is possible: Untrusted, content-derived output reaches a code evaluation path without sufficient isolation, validation, or human review

Why this happens

The underlying bug is the execution of dynamically generated Python based on data that may be controlled by external web content.

This maps to CWE-94: Improper Control of Generation of Code ('Code Injection'), because the application treats language-model output as executable program logic instead of inert data. Indirect prompt injection can influence that output and cause attacker-selected behavior to be evaluated in the application's execution context.

Potential impact

  • Arbitrary code execution on the operator's host
  • Exposure or modification of local files and application secrets
  • Unauthorized network access from the affected host
  • Persistence, data tampering, or disruption of automation workflows
  • Potential compromise of connected systems when excessive privileges are available

General mitigation guidance

Mitigation generally focuses on removing dynamic code execution from data-processing paths and reducing trust in model output.

Common defensive patterns include:

  • Representing extracted results as structured data rather than executable Python
  • Using constrained parsers, schemas, and allowlisted transformations
  • Treating web content and language-model output as untrusted across trust boundaries
  • Requiring explicit human approval before any generated logic can run
  • Isolating unavoidable evaluation in a hardened sandbox with minimal filesystem, network, and process privileges
  • Running extraction workflows with dedicated low-privilege identities and narrowly scoped credentials

How teams detect issues like this

Organizations can look for:

  • Static-analysis findings involving eval, exec, dynamic imports, or equivalent code-generation and evaluation paths
  • Code-review signals where language-model output flows into interpreters, compilers, templates, or command execution
  • Data-flow analysis connecting web retrieval or external content to executable APIs
  • Policy checks requiring schemas, approval gates, and sandboxing for generated code
  • Runtime monitoring for unexpected child processes, file access, network connections, or privilege use by extraction workers

Automated security review tools may help identify dangerous sinks, but findings should be validated against the complete data flow.

Sources

SourceLink
github.comgithub.com/lavague-ai/LaVague
github.comgithub.com/lavague-ai/LaVague/blob/9024bb83/lavague-core/lavague/core/extractors.py
github.comgithub.com/lavague-ai/LaVague/issues/650
vulncheck.comvulncheck.com/advisories/lavague-0.2.35-remote-code-execution-via-eval-extraction

Frequently asked

questions

It can be exploitable through remotely controlled web content when an automated or operator-driven workflow retrieves that content and passes influenced output to the vulnerable extractor.

Direct host access is not necessarily required. The relevant prerequisite is the ability to influence content consumed by the LaVague workflow, although deployment-specific controls affect practical exploitability.

Do not evaluate model-generated or web-derived text as Python. Parse results as constrained data and place any unavoidable computation in a strongly isolated, least-privileged sandbox.

Maintain a strict trust boundary around external content and model output, use allowlisted structured transformations, require review before execution, and monitor generated workflows for abnormal process or resource activity.

Find out what's already
exploitable in your codebase.