CVE-2025-51464
Python vulnerability analysis and mitigation

Overview

Cross-site Scripting (XSS) vulnerability was discovered in aimhubio Aim version 3.28.0, identified as CVE-2025-51464. The vulnerability allows remote attackers to execute arbitrary JavaScript in victims' browsers through malicious Python code submitted to the /api/reports endpoint. The submitted code is interpreted and executed by Pyodide when the report is viewed, with no sanitization or sandbox restrictions preventing JavaScript execution via pyodide.code.run_js() (NVD, Gecko Security).

Technical details

The vulnerability stems from the /api/reports API endpoint which accepts user-supplied Python code in the code field of POST requests. The data flow begins when code is stored in the database without sanitization via the Report model. When retrieved, the code is embedded within a React component where the markdown renderer interprets code blocks with the 'aim' language tag. These code blocks are passed to the Board component for execution in Board.tsx, where Pyodide loads and executes the Python code without any restrictions on JavaScript execution through pyodide.code.run_js() (Gecko Security).

Impact

The vulnerability allows attackers to execute arbitrary JavaScript code in victims' browsers, enabling them to steal authentication cookies and tokens, access and exfiltrate sensitive information from the application, and make authenticated requests on behalf of victims (Gecko Security).

Mitigation and workarounds

A fix has been implemented through a pull request that introduces validation functions to detect and block potentially malicious code containing calls like pyodide.code.runjs(). The patch specifically modifies the reportspostapi and reportsputapi functions in aim/web/api/reports/views.py to include the validatecode_safety check before saving or updating any code (GitHub PR).

Additional resources


SourceThis report was generated using AI

Related Python vulnerabilities:

CVE ID

Severity

Score

Technologies

Component name

CISA KEV exploit

Has fix

Published date

CVE-2025-66471HIGH8.9
  • PythonPython
  • urllib3
NoYesDec 05, 2025
CVE-2025-66418HIGH8.9
  • PythonPython
  • python-urllib3
NoYesDec 05, 2025
CVE-2025-65958HIGH8.5
  • PythonPython
  • cpe:2.3:a:openwebui:open_webui
NoYesDec 04, 2025
CVE-2025-56427HIGH7.5
  • PythonPython
  • composio
NoNoDec 04, 2025
CVE-2025-63681MEDIUM4.3
  • PythonPython
  • open-webui
NoNoDec 04, 2025

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