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

CVE-2024-40628

CVE-2024-40628 Information Disclosure in Jumpserver
📅 PUBLISHED: 2024-07-18 17:05 UTC 🔄 UPDATED: 2026-10-08 19:48 UTC
[ PATCH UNDER REVIEW ↓ ] Remains UNDER REVIEW until an independent source confirms the fix
[ DEFENSE PATCH ↓ ]
💣 PoC: None
👁️
Proof of Concept - Indicates if functional exploit code is publicly available, drastically increasing the risk of immediate attacks.
🎯 EPSS: 0.86%
👁️
0.86% probability
21.5× above the median CVE
Tier: ELEVATED
30-day exploitation window · FIRST.org · updated daily
VULNERABLE: version not auto-detected — verify your deployed version locally
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
10.0
THREAT LEVEL
■ tracking this CVE ✓ independent patch confirmation ⧗ same-origin mirror (GHSA) ⚠ active exploitation verification policy →

Executive Summary

CVE-2024-40628 is a critical vulnerability in Jumpserver, an open-source Privileged Access Management (PAM) tool. An attacker can exploit the ansible playbook functionality to read arbitrary files within the celery container, leading to sensitive information disclosure. The celery container runs as root and has database access, allowing an attacker to steal all secrets for hosts, create a new admin account, or manipulate the database. The vulnerability has been addressed in versions 3.10.12 and 4.0.0. No known workarounds exist.

⚡ 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

Jumpserver is a Python-based application distributed via GitHub and Docker images. The vulnerability exists in the core application code, not in a third-party package. However, the use of ansible playbooks introduces a risk of arbitrary file read. Users should verify the integrity of their Jumpserver installation and ensure they are using official releases.

CVSS Breakdown & Threat Level

  • CVSS Score: 10.0 (Critical)
  • Attack Vector: Network (AV:N)
  • Attack Complexity: Low (AC:L)
  • Privileges Required: None (PR:N)
  • User Interaction: None (UI:N)
  • Scope: Unchanged (S:U)
  • Confidentiality Impact: High (C:H)
  • Integrity Impact: High (I:H)
  • Availability Impact: High (A:H)

This vulnerability allows unauthenticated remote attackers to fully compromise the Jumpserver instance, including access to all managed host secrets and database manipulation.

Deep Dive & Mechanics

The vulnerability resides in the ansible playbook execution functionality within Jumpserver. The celery container, which processes background tasks, runs as root and has direct database access. An attacker can craft a malicious ansible playbook that includes file read operations (e.g., using the slurp module or cat command) to read arbitrary files from the container's filesystem.

The attack flow:

  1. The attacker sends a crafted request to the Jumpserver API that triggers an ansible playbook execution.
  2. The playbook includes a task that reads sensitive files (e.g., /etc/jumpserver/config.yml, database credentials, SSH keys).
  3. The output of the playbook is returned to the attacker, revealing the file contents.
  4. With database access, the attacker can extract all host secrets, create a new admin user, or modify database records.

The root cause is insufficient input validation and sanitization of ansible playbook content, allowing arbitrary file read operations.

Vulnerable vs. Patched Code

Vulnerable Code (pre-3.10.12 / pre-4.0.0): The vulnerable code likely does not restrict the ansible modules or commands that can be used in playbooks. For example, the playbook execution function may accept any valid ansible playbook without filtering dangerous modules like slurp, fetch, or command.

# Vulnerable: No restrictions on playbook content
def execute_playbook(playbook_content):
    # Directly executes the playbook
    result = ansible_runner.run(playbook=playbook_content)
    return result

Patched Code (3.10.12 / 4.0.0): The patched code likely implements a whitelist of allowed ansible modules or sanitizes the playbook to prevent file read operations. It may also restrict the playbook to only use specific modules like shell with limited commands.

# Patched: Whitelist allowed modules
ALLOWED_MODULES = ['command', 'shell', 'copy', 'template']

def execute_playbook(playbook_content):
    # Parse playbook and check modules
    for task in playbook_content['tasks']:
        module = task.get('module')
        if module not in ALLOWED_MODULES:
            raise ValueError(f"Module {module} not allowed")
    result = ansible_runner.run(playbook=playbook_content)
    return result

Exploitation & Lab Setup

Red Team

Lab Setup:

  1. Deploy a vulnerable Jumpserver instance (version < 3.10.12) using Docker:
    docker run -d --name jumpserver -p 8080:80 jumpserver/jumpserver:3.10.11
    
  2. Access the web interface at http://localhost:8080.

Exploitation Steps:

  1. Authenticate to Jumpserver (if required) or find an unauthenticated endpoint that triggers ansible playbook execution.
  2. Craft a malicious playbook that reads sensitive files:
    - hosts: localhost
      tasks:
        - name: Read config file
          slurp:
            src: /etc/jumpserver/config.yml
          register: config
        - name: Exfiltrate data
          debug:
            msg: "{{ config['content'] | b64decode }}"
    
  3. Send the playbook to the vulnerable endpoint (e.g., via API or web form).
  4. Retrieve the output containing the base64-encoded file content.
  5. Decode the content to obtain sensitive data (database credentials, SSH keys, etc.).
  6. Use the database credentials to connect to the Jumpserver database and extract all host secrets or create a new admin account.

Blue Team

Detection:

  • Monitor for unusual ansible playbook submissions, especially those containing slurp, fetch, or file modules.
  • Alert on playbooks that attempt to read files outside of expected paths (e.g., /etc/, /var/lib/).
  • Monitor database connections for unusual queries or new admin user creation.

Hunting:

  • Search logs for playbook execution events with suspicious module names.
  • Look for base64-encoded data in playbook outputs.
  • Check for new user accounts created with admin privileges.

Indicators of Compromise (IOCs)

  • File Paths: /etc/jumpserver/config.yml, /var/lib/jumpserver/, /root/.ssh/
  • Network: Outbound connections from the Jumpserver container to attacker-controlled IPs
  • Logs: Ansible playbook execution logs containing slurp, fetch, or file modules
  • Database: New admin user accounts, modified host secrets
  • Processes: Ansible runner processes with unusual arguments

Detection Engineering

YARA Rule

rule CVE_2024_40628_Ansible_Playbook_File_Read {
    meta:
        description = "Detects malicious ansible playbooks attempting file read via slurp or fetch modules"
        author = "Valters IT"
        date = "2024-01-01"
        reference = "CVE-2024-40628"
    strings:
        $slurp = "slurp" nocase
        $fetch = "fetch" nocase
        $file_read = /src:\s*["']?\/[^"']+/ nocase
        $b64decode = "b64decode" nocase
    condition:
        ($slurp or $fetch) and $file_read and $b64decode
}

Sigma Rule

title: CVE-2024-40628 Ansible Playbook File Read
id: 12345678-1234-1234-1234-123456789012
status: experimental
description: Detects attempts to exploit CVE-2024-40628 via malicious ansible playbooks
author: Valters IT
date: 2024/01/01
logsource:
    category: application
    product: jumpserver
detection:
    selection:
        event: "playbook_execution"
        module: 
            - "slurp"
            - "fetch"
        src: 
            - "/etc/*"
            - "/var/lib/*"
            - "/root/*"
    condition: selection
falsepositives:
    - Legitimate administrative tasks using slurp/fetch
level: high

Suricata Rule

alert http any any -> any any (msg:"CVE-2024-40628 Jumpserver Ansible Playbook File Read"; flow:to_server; content:"slurp"; nocase; content:"src"; nocase; distance:0; pcre:"/src\s*:\s*["']?\/[^"']+/i"; classtype:attempted-admin; sid:1000001; rev:1;)

Remediation & Mitigation

Immediate Actions:

  1. Upgrade Jumpserver to version 3.10.12 or 4.0.0 immediately.
  2. If upgrade is not possible, restrict network access to the Jumpserver API and web interface.
  3. Monitor for suspicious ansible playbook submissions.

Long-term Mitigations:

  • Implement strict input validation for ansible playbooks.
  • Use a whitelist of allowed ansible modules.
  • Run the celery container with reduced privileges (non-root).
  • Implement database access controls and encryption at rest.
  • Regularly audit user accounts and permissions.

Workarounds:

  • No known workarounds exist. Upgrade is the only solution.

Valters IT

◈ SOURCE Analysis & enrichment: valtersit.com/cve/CVE-2024-40628/ · 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.