CVE-2026-67195
Perspective `eval` injection allows unauthenticated remote code execution.
- CVSS 8.7
- 95
- Input Validation and Sanitization
- Remote
Perspective 5.0.0 contains a remote code execution vulnerability that allows unauthenticated attackers to execute arbitrary operating system commands by submitting crafted expression strings to the PolarsVirtualServer backend, which passes client-supplied input directly to Python's eval() with only __builtins__={} cleared. Attackers can exploit Python object attribute traversal through the interpreter's loaded class list to reach subprocess.Popen via a TableValidateExprReq or TableMakeViewReq protobuf message, achieving arbitrary command execution in the Perspective host process.
- CWE
- 95
- CVSS base score
- 8.7
- Published
- 2026-08-04
- OWASP
- A03 Injection
- Orthogonal defect classification
- Checking
- Code defect classification
- Incorrect Check
- Category
- Input Validation and Sanitization
- Subcategory
- Command Injection
- Accessibility scope
- Remote
- Impact
- Arbitrary Code Execution
- Affected component
- Perspective
- Fixed by upgrading
- Yes
Solution
Upgrade to Perspective version 5.0.1 or later.
Vulnerable code sample
import polars as pl
# Simplified representation of a server handling expression validation,
# as described in the CVE.
class PolarsVirtualServer:
def __init__(self):
# A table object that will be in the scope of the eval.
self.tables = {"my_table": pl.DataFrame({"a": [1]})}
def handle_expression_request(self, expression_string: str):
"""
Handles a request with a user-supplied expression string.
"""
# The context provides a starting object for attribute traversal attacks,
# even with __builtins__ cleared, which is an incomplete sandbox.
sandbox_globals = {"__builtins__": {}}
sandbox_locals = {"table": self.tables["my_table"]}
try:
# VULNERABLE: Client input is passed to eval, allowing RCE via attribute traversal from the 'table' object.
result = eval(expression_string, sandbox_globals, sandbox_locals)
return {"valid": True, "result": result}
except Exception as e:
return {"valid": False, "error": str(e)}Patched code sample
import polars as pl
import ast
# Simplified representation of a server handling expression validation,
# as described in the CVE.
class PolarsVirtualServer:
def __init__(self):
# A table object that will be in the scope of the eval.
self.tables = {"my_table": pl.DataFrame({"a": [1]})}
def handle_expression_request(self, expression_string: str):
"""
Handles a request with a user-supplied expression string.
"""
# With a safe parser, the sandbox context is no longer used for evaluation,
# but is kept here to highlight the minimal nature of the fix.
sandbox_globals = {"__builtins__": {}}
sandbox_locals = {"table": self.tables["my_table"]}
try:
# FIX: Use ast.literal_eval to safely evaluate static literals, which prevents code execution.
result = ast.literal_eval(expression_string)
return {"valid": True, "result": result}
except (ValueError, SyntaxError) as e:
return {"valid": False, "error": str(e)}Payload
[c for c in ().__class__.__base__.__subclasses__() if c.__name__ == '_wrap_close'][0].__init__.__globals__['system']('touch /tmp/pwned')
Cite this entry
@misc{vaitp:cve202667195,
title = {{Perspective `eval` injection allows unauthenticated remote code execution.}},
author = {Bogaerts, Fr\'ed\'eric and Ivaki, Naghmeh and Fonseca, Jos\'e},
year = {2026},
note = {VAITP Python Vulnerability Dataset, entry CVE-2026-67195},
howpublished = {\url{https://netpack.pt/vaitp/vulnerability/CVE-2026-67195/}}
}
Introducing the "VAITP dataset": a specialized repository of Python vulnerabilities and patches, meticulously compiled for the use of the security research community. As Python's prominence grows, understanding and addressing potential security vulnerabilities become crucial. Crafted by and for the cybersecurity community, this dataset offers a valuable resource for researchers, analysts, and developers to analyze and mitigate the security risks associated with Python. Through the comprehensive exploration of vulnerabilities and corresponding patches, the VAITP dataset fosters a safer and more resilient Python ecosystem, encouraging collaborative advancements in programming security.
The supreme art of war is to subdue the enemy without fighting.
Sun Tzu – “The Art of War”
:: Shaping the future through research and ingenuity ::
