Skip to main content

Improper Link Resolution Before File Access ('Link Following')

CVE-2024-6868

Severity High
Score 9.8/10

Summary

The package github.com/mudler/localai versions prior to 2.18.0 allow for arbitrary file writes due to improper handling of automatic archive extraction. When model configurations specify additional files as archives (e.g., .tar), these archives are automatically extracted after downloading. This behavior can be exploited to perform a 'tarslip' attack, allowing files to be written to arbitrary locations on the server, bypassing checks that normally restrict files to the models directory. This vulnerability can lead to Remote Code Execution (RCE) by overwriting backend assets used by the server.

  • LOW
  • NETWORK
  • HIGH
  • UNCHANGED
  • NONE
  • NONE
  • HIGH
  • HIGH

CWE-59 - Improper Link Resolution Before File Access

'Improper link resolution before file access' occurs when software accesses a file resource but fails to verify that the file isn't a link or shortcut to another file. An attacker can potentially gain access to arbitrary files and from there the impact can vary, depending on the application, from sensitive data exposure to remote code execution.

Advisory Timeline

  • Published