CVE-2024-39721

An issue was discovered in Ollama before 0.1.34. The CreateModelHandler function uses os.Open to read a file until completion. The req.Path parameter is user-controlled and can be set to /dev/random, which is blocking, causing the goroutine to run infinitely (even after the HTTP request is aborted by the client).
Configurations

Configuration 1 (hide)

cpe:2.3:a:ollama:ollama:*:*:*:*:*:*:*:*

History

13 May 2025, 12:53

Type Values Removed Values Added
References () https://github.com/ollama/ollama/blob/9164b0161bcb24e543cba835a8863b80af2c0c21/server/routes.go#L557 - () https://github.com/ollama/ollama/blob/9164b0161bcb24e543cba835a8863b80af2c0c21/server/routes.go#L557 - Product
References () https://github.com/ollama/ollama/blob/adeb40eaf29039b8964425f69a9315f9f1694ba8/server/routes.go#L536 - () https://github.com/ollama/ollama/blob/adeb40eaf29039b8964425f69a9315f9f1694ba8/server/routes.go#L536 - Product
References () https://www.oligo.security/blog/more-models-more-probllms - () https://www.oligo.security/blog/more-models-more-probllms - Exploit, Third Party Advisory
CPE cpe:2.3:a:ollama:ollama:*:*:*:*:*:*:*:*
Summary
  • (es) Se descubrió un problema en Ollama antes de la versión 0.1.34. La función CreateModelHandler usa os.Open para leer un archivo hasta que se complete. El parámetro req.Path está controlado por el usuario y se puede configurar en /dev/random, que es bloqueador y hace que la goroutine se ejecute infinitamente (incluso después de que el cliente cancele la solicitud HTTP).
First Time Ollama ollama
Ollama

01 Nov 2024, 16:35

Type Values Removed Values Added
CWE CWE-404
CVSS v2 : unknown
v3 : unknown
v2 : unknown
v3 : 7.5

01 Nov 2024, 14:15

Type Values Removed Values Added
References
  • {'url': 'https://oligosecurity.webflow.io/blog/more-models-more-probllms', 'source': 'cve@mitre.org'}
  • () https://www.oligo.security/blog/more-models-more-probllms -

31 Oct 2024, 20:15

Type Values Removed Values Added
New CVE

Information

Published : 2024-10-31 20:15

Updated : 2025-05-13 12:53


NVD link : CVE-2024-39721

Mitre link : CVE-2024-39721

CVE.ORG link : CVE-2024-39721


JSON object : View

Products Affected

ollama

  • ollama
CWE
CWE-404

Improper Resource Shutdown or Release