CVE-2025-5321
Python vulnerability analysis and mitigation

Overview

A critical vulnerability has been discovered in aimhubio aim versions up to 3.29.1, identified as CVE-2025-5321. The vulnerability affects the RestrictedPythonQuery function in the /aim/storage/query.py file, specifically within the run_view Object Handler component. The issue was disclosed in May 2025, and despite early notification, the vendor has not responded to the disclosure (VulDB).

Technical details

The vulnerability stems from improper implementation of Python sandbox restrictions in the RestrictedPythonQuery class. The issue occurs when an unsanitized runview object is passed into the sandbox environment as part of the local namespace in sequence collection runners. This implementation flaw allows attackers to traverse the object graph through runview.run.db.runs().session.bind.dialect.dbapi.datetime.sys to access restricted modules like sys and os. The vulnerability has received a CVSS v4.0 score of 5.3 (Medium) and CVSS v3.1 score of 6.3 (Medium) (NVD).

Impact

The vulnerability allows remote attackers to escape the intended Python sandbox environment and potentially achieve remote code execution (RCE). Through the exposed web API, attackers can execute arbitrary system commands, leading to complete system compromise. The vulnerability affects the security principle of privilege separation and access controls (GitHub POC).

Mitigation and workarounds

As of the latest reports, no official patch has been released by the vendor. Users are advised to restrict access to the affected API endpoints and monitor for suspicious activities. Organizations should consider implementing additional security controls or temporarily disabling the affected functionality until a patch becomes available (VulDB).

Additional resources


SourceThis report was generated using AI

Free Vulnerability Assessment

Benchmark your Cloud Security Posture

Evaluate your cloud security practices across 9 security domains to benchmark your risk level and identify gaps in your defenses.

Request assessment

Get a personalized demo

Ready to see Wiz in action?

“Best User Experience I have ever seen, provides full visibility to cloud workloads.”
David EstlickCISO
“Wiz provides a single pane of glass to see what is going on in our cloud environments.”
Adam FletcherChief Security Officer
“We know that if Wiz identifies something as critical, it actually is.”
Greg PoniatowskiHead of Threat and Vulnerability Management