---
id: CVE-2025-5321
aliases:
  - GHSA-gp5h-f9c5-8355
  - PYSEC-2026-1088
title: Aim Vulnerable to Sandbox Escape Leading to Remote Code Execution
summary: Aim Vulnerable to Sandbox Escape Leading to Remote Code Execution
severity: medium
cvss: 6.3
cvssVector: 'CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:L/I:L/A:L'
vendor: aim
product: aim
ecosystem: pip
affected:
  - aim <= 3.29.1
published: '2025-05-29'
updated: '2026-09-10'
sourceUpdated: '2026-09-10T03:50:57.590851972Z'
source: OSV
sourceUrl: 'https://osv.dev/vulnerability/GHSA-gp5h-f9c5-8355'
references:
  - url: 'https://nvd.nist.gov/vuln/detail/CVE-2025-5321'
  - url: 'https://gist.github.com/superboy-zjc/1fc4747a0ac77a1edc8c32e1d4edc54c'
  - url: 'https://github.com/aimhubio/aim'
  - url: 'https://vuldb.com/?ctiid.310492'
  - url: 'https://vuldb.com/?id.310492'
  - url: 'https://vuldb.com/?submit.580253'
tags:
  - osv
  - pip
epss: 0.00586
epssPercentile: 0.45715
ingestedAt: '2026-07-08T18:25:49.749Z'
---

## Overview

A vulnerability classified as critical was found in aimhubio aim up to 3.29.1. This vulnerability affects the function RestrictedPythonQuery of the file /aim/storage/query.py of the component run_view Object Handler. The manipulation of the argument Query leads to sandbox issue. The attack can be initiated remotely. The exploit has been disclosed to the public and may be used. The vendor was contacted early about this disclosure but did not respond in any way.

## Affected packages

- `aim <= 3.29.1`

## Remediation

Refer to the advisory for the patched release.
