Skip to main content

CVE-2024-6578: Aimstack Aim Stored XSS Vulnerability

CVE-2024-6578 is a stored XSS flaw in Aimstack Aim that allows attackers to inject malicious scripts into terminal logs. This post explains its impact, affected versions, and mitigation steps.

Published:

Disclaimer: This content was generated using AI. While we strive for accuracy, please verify critical information with official sources.

Sources: National Vulnerability Database, CISA KEV, Exploit-DB

CVE-2024-6578 Overview

CVE-2024-6578 is a stored cross-site scripting (XSS) vulnerability in aimhubio/aim version 3.19.3. The flaw resides in the logs-tab for runs, where terminal output logs are rendered using React's dangerouslySetInnerHTML function without proper sanitization. An authenticated attacker can inject malicious script payloads into run logs, which execute in the browser of any user who views the affected logs-tab.

Critical Impact

Attackers with low privileges can execute arbitrary JavaScript in victim browsers, enabling session theft, UI manipulation, and lateral actions within the Aim application context.

Affected Products

  • Aimstack Aim 3.19.3
  • Aim web UI logs-tab component
  • React front-end using dangerouslySetInnerHTML for terminal log rendering

Discovery Timeline

  • 2024-07-29 - CVE-2024-6578 published to NVD
  • 2026-06-17 - Last updated in NVD database

Technical Details for CVE-2024-6578

Vulnerability Analysis

The vulnerability is a stored cross-site scripting flaw classified under [CWE-79]. Aim is an open-source experiment tracker used in machine learning workflows. The web interface displays run logs through a React component that renders raw HTML via dangerouslySetInnerHTML. This React API bypasses the framework's default escaping, delegating sanitization responsibility to the developer.

Because the logs-tab does not sanitize or encode terminal output before rendering, any HTML or JavaScript included in the log stream is executed by the browser. The payload persists in the backing storage for the run, making this a stored XSS rather than a reflected variant. Any user visiting the logs-tab of a tainted run triggers execution.

Exploitation requires user interaction, specifically a victim navigating to the logs view. The scope is changed because script execution occurs in the browser security context of other authenticated users viewing the same Aim deployment.

Root Cause

The root cause is improper neutralization of input during web page generation. The React logs-tab component passes untrusted log content directly to dangerouslySetInnerHTML without applying an allowlist sanitizer such as DOMPurify or encoding HTML metacharacters. Terminal output is treated as trusted markup rather than untrusted text.

Attack Vector

An attacker with permission to create or write to a run submits log content containing HTML or <script> constructs, or event-handler attributes on tags such as <img onerror=...>. The payload is stored with the run. When another user opens the logs-tab for that run, the browser parses the injected markup and executes the attacker-controlled script within the Aim origin.

Technical details are documented in the Huntr Bug Bounty Report.

Detection Methods for CVE-2024-6578

Indicators of Compromise

  • Run log entries containing HTML tags such as <script>, <img>, <svg>, or inline event handlers like onerror, onload, onclick
  • Unexpected outbound requests from browsers viewing the Aim logs-tab to attacker-controlled domains
  • Anomalous session activity or token reuse from users who recently viewed shared runs

Detection Strategies

  • Scan stored run log data for HTML entities and JavaScript keywords that would not appear in normal terminal output
  • Enable browser-side Content Security Policy (CSP) violation reporting to surface inline script execution attempts in the Aim UI
  • Review web proxy logs for Aim users making unexpected cross-origin requests shortly after visiting the logs-tab

Monitoring Recommendations

  • Monitor Aim server access logs for log-write operations containing suspicious payloads from unprivileged accounts
  • Alert on new or modified runs created by accounts outside expected ML pipeline service identities
  • Track user navigation to the logs-tab correlated with subsequent authentication anomalies on integrated systems

How to Mitigate CVE-2024-6578

Immediate Actions Required

  • Restrict access to the Aim web interface to trusted networks and authenticated users only
  • Audit existing run logs for stored HTML or script payloads and purge affected runs
  • Limit which accounts can submit runs or write log data to the Aim backend
  • Advise users to avoid opening logs-tab views for runs created by untrusted contributors until a fix is applied

Patch Information

No vendor patch URL is listed in the NVD entry for version 3.19.3 at the time of publication. Review the Huntr Bug Bounty Report and the upstream aimhubio/aim repository for remediation guidance and upgrade to a version where the logs-tab sanitizes rendered HTML.

Workarounds

  • Place Aim behind an authenticating reverse proxy and apply a strict Content Security Policy that disallows inline scripts and restricts script sources
  • Disable or hide the logs-tab in the UI if the deployment does not require it
  • Pre-sanitize log content at ingestion by stripping HTML tags from terminal output before it reaches the Aim backend
  • Segment the Aim deployment from sensitive internal applications to reduce the blast radius of session-based attacks

Disclaimer: This content was generated using AI. While we strive for accuracy, please verify critical information with official sources.

Sources: National Vulnerability Database, CISA KEV, Exploit-DB

Experience the Most Advanced Cybersecurity Platform

See how the world’s most intelligent, autonomous cybersecurity platform can protect your organization today and into the future.