Skip to content
Heist/ feed
Back to feed
High

Security advisory

Type: advisorySources: OSVCVE: 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).

Products
Not specified
Affected versions
Not specified
Fixed versions
Not specified
CVEs
CVE-2024-39721
Confirmed fixed CVEs
Not specified
Updated in this feed
3 Nov 2026, 04:02 UTC · Revision 1

Source evidence

CVE-2024-39721

core-osv · Original source

Published 31 Oct 2024, 00:00 UTC

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).

osv:CVE-2024-39721
Complete source record
{
  "id": "a5439fd4e3715d39c6085739685de545e4e20008992728500b3f95e51672a307",
  "url": "https://osv.dev/vulnerability/CVE-2024-39721",
  "method": "structured",
  "payload": {
    "kind": "advisory",
    "title": "CVE-2024-39721",
    "summary": "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).",
    "evidence": "osv:CVE-2024-39721",
    "products": [],
    "severity": "high",
    "structured": {
      "id": "CVE-2024-39721",
      "aliases": [
        "CVE-2024-39721"
      ],
      "metrics": [
        {
          "type": "CVSS_V3",
          "score": "CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H"
        }
      ],
      "affected": [
        {
          "ranges": [
            {
              "repo": "https://github.com/ollama/ollama",
              "type": "GIT",
              "events": [
                {
                  "introduced": "0"
                },
                {
                  "fixed": "adeb40eaf29039b8964425f69a9315f9f1694ba8"
                }
              ],
              "database_specific": {
                "extracted_events": [
                  {
                    "range": [
                      {
                        "introduced": "0"
                      },
                      {
                        "fixed": "0.1.34"
                      }
                    ],
                    "source": "DESCRIPTION"
                  },
                  {
                    "cpe": "cpe:2.3:a:ollama:ollama:*:*:*:*:*:*:*:*",
                    "range": [
                      {
                        "introduced": "0"
                      },
                      {
                        "fixed": "0.1.34"
                      }
                    ],
                    "source": "CPE_RANGE"
                  }
                ]
              }
            }
          ],
          "versions": [
            "v0.1.34-rc1",
            "v0.1.33",
            "v0.1.33-rc7",
            "v0.1.33-rc6",
            "v0.1.33-rc5",
            "v0.1.33-rc4",
            "v0.1.33-rc3",
            "v0.1.33-rc2",
            "v0.1.33-rc1",
            "v0.1.32",
            "v0.1.32-rc2",
            "v0.1.32-rc1",
            "v0.1.30",
            "v0.1.29",
            "v0.1.28",
            "v0.1.27",
            "v0.1.26",
            "v0.1.25",
            "v0.1.24",
            "v0.1.23",
            "v0.1.22",
            "v0.1.21",
            "v0.1.20",
            "v0.1.19",
            "v0.1.18",
            "v0.1.17",
            "v0.1.16",
            "v0.1.15",
            "v0.1.14",
            "v0.1.13",
            "v0.1.12",
            "v0.1.11",
            "v0.1.10",
            "v0.1.9",
            "v0.1.8",
            "v0.1.7",
            "v0.1.6",
            "v0.1.5",
            "v0.1.4",
            "v0.1.3",
            "v0.1.2",
            "v0.1.1",
            "v0.1.0",
            "v0.0.21",
            "v0.0.20",
            "v0.0.19",
            "v0.0.18",
            "v0.0.17",
            "v0.0.16",
            "v0.0.15",
            "v0.0.14",
            "v0.0.13",
            "v0.0.12",
            "v0.0.11",
            "v0.0.10",
            "v0.0.9",
            "v0.0.8",
            "v0.0.7",
            "v0.0.6",
            "v0.0.5",
            "v0.0.4",
            "v0.0.3",
            "v0.0.2",
            "v0.0.1"
          ],
          "database_specific": {
            "source": "https://storage.googleapis.com/cve-osv-conversion/osv-output/CVE-2024-39721.json"
          }
        }
      ],
      "modified": "2026-10-28T02:30:25.677405940Z",
      "provider": "osv",
      "references": [
        "https://github.com/ollama/ollama/blob/9164b0161bcb24e543cba835a8863b80af2c0c21/server/routes.go#L557",
        "https://github.com/ollama/ollama/blob/adeb40eaf29039b8964425f69a9315f9f1694ba8/server/routes.go#L536",
        "https://github.com/CVEProject/cvelistV5/tree/main/cves/2024/39xxx/CVE-2024-39721.json",
        "https://nvd.nist.gov/vuln/detail/CVE-2024-39721",
        "https://www.oligo.security/blog/more-models-more-probllms"
      ],
      "provider_metadata": {
        "cna_assigner": "mitre",
        "osv_generated_from": "https://github.com/CVEProject/cvelistV5/tree/main/cves/2024/39xxx/CVE-2024-39721.json"
      }
    },
    "related_cves": [
      {
        "value": "CVE-2024-39721",
        "evidence": "/id"
      }
    ],
    "security_relevant": true,
    "severity_evidence": "/severity/0/score"
  },
  "source_id": "core-osv",
  "document_id": 492382,
  "published_at": "2024-10-31T00:00:00+00:00"
}