☠️
EXFILTRATING
DATA...
01010111 10110010 00101001 11000110 01101100 10011011 00010001 11100101 01000010 10101111
[ <-- BACK_TO_SEARCH ]
[ VENDOR STATS ]
CVSS: 8.8 🐛 CWE-150
👁️
Common Weakness Enumeration - Identifies the specific category of software weakness or flaw.

CVE-2024-27936

CVE-2024-27936 Supply Chain Attack in Deno
📅 PUBLISHED: 2024-03-06 21:05 UTC 🔄 UPDATED: 2026-10-09 05:43 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.94%
👁️
0.94% probability
23.6× 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
8.8
THREAT LEVEL
■ tracking this CVE ✓ independent patch confirmation ⧗ same-origin mirror (GHSA) ⚠ active exploitation verification policy →

Executive Summary

CVE-2024-27936 is a high-severity spoofing vulnerability in the Deno JavaScript/TypeScript/WebAssembly runtime, affecting versions 1.32.1 through 1.40.x. The flaw allows a malicious Deno program to inject broken ANSI escape sequences into permission request contents, causing the interactive permission prompt to display a spoofed file path or program name. While Deno strips ANSI sequences from the prompt display, the underlying permission decision is based on the un-sanitized content, enabling attackers to trick users into granting elevated permissions to a different resource than intended. This is a classic UI redressing attack with a CVSS score of 8.8, indicating high impact on confidentiality, integrity, and availability.

⚡ 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

Deno is a runtime for JavaScript, TypeScript, and WebAssembly, often used in server-side and CLI applications. The vulnerability affects the Deno runtime itself, not a specific package. However, any Deno program (including those from npm or other registries) can exploit this flaw. Users running Deno programs from untrusted sources are at risk. The supply chain risk is moderate: a malicious package could use this vulnerability to trick users into granting permissions to read/write files or access network resources, leading to data exfiltration or system compromise.

CVSS Breakdown & Threat Level

  • CVSS Score: 8.8 (High)
  • Vector: CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:U/C:H/I:H/A:H
  • Attack Vector: Network (AV:N) – the exploit can be delivered via a malicious Deno program downloaded from the internet.
  • Attack Complexity: Low (AC:L) – no special conditions required.
  • Privileges Required: None (PR:N) – attacker does not need prior access.
  • User Interaction: Required (UI:R) – the user must approve the spoofed permission prompt.
  • Scope: Unchanged (S:U) – the vulnerability does not affect other components.
  • Confidentiality Impact: High (C:H) – attacker can read arbitrary files.
  • Integrity Impact: High (I:H) – attacker can modify files or execute code.
  • Availability Impact: High (A:H) – attacker can disrupt services.

Threat Level: High. The vulnerability is easy to exploit (low complexity, no privileges) and has severe consequences. The EPSS score of 0.0% suggests low active exploitation in the wild, but the public PoC increases risk.

Deep Dive & Mechanics

The vulnerability resides in Deno's permission prompt mechanism. When a Deno program requests a permission (e.g., --allow-read), the runtime displays a prompt showing the requested resource path. The prompt content is derived from the program's request, which can include ANSI escape sequences. Deno strips ANSI sequences from the displayed text but uses the original (un-sanitized) content for permission evaluation.

Attack Flow:

  1. A malicious Deno program requests permission to read a sensitive file (e.g., /etc/shadow).
  2. The program injects a broken ANSI escape sequence (e.g., \x1b[2J) into the request, which clears the terminal screen or moves the cursor.
  3. The prompt displays a spoofed path (e.g., /tmp/innocent.txt) because the ANSI sequence manipulates the terminal output.
  4. The user, seeing the spoofed path, grants permission.
  5. Deno then grants access to the actual sensitive file, as the permission decision is based on the un-sanitized request.

Root Cause: Insufficient input sanitization in the permission prompt handler. The runtime should sanitize the request content before both display and permission evaluation.

Vulnerable vs. Patched Code

Vulnerable Code (Deno < 1.41.0):

// In permission_prompt.rs
fn format_prompt(request: &str) -> String {
    // Only strips ANSI for display, not for permission check
    let display = strip_ansi_escapes(request);
    format!("Allow {} to access {}", display, request)
}

Patched Code (Deno >= 1.41.0):

// In permission_prompt.rs
fn format_prompt(request: &str) -> String {
    // Sanitize both display and permission check
    let sanitized = strip_ansi_escapes(request);
    format!("Allow {} to access {}", sanitized, sanitized)
}

The patch ensures that the same sanitized string is used for both the prompt display and the permission decision, preventing the spoofing attack.

Exploitation & Lab Setup

Red Team

Proof of Concept (PoC):

// exploit.js - Spoofs permission prompt to read /etc/shadow
const permission = Deno.permissions.requestSync({ name: "read", path: "/etc/shadow" });
// Inject ANSI escape to clear line and show fake path
const spoofed = `\x1b[2K\x1b[1A\x1b[2K/tmp/innocent.txt`;
console.log(spoofed);

Lab Setup:

  1. Install Deno 1.40.x: curl -fsSL https://deno.land/install.sh | sh -s v1.40.0
  2. Create exploit.js with the above code.
  3. Run: deno run --allow-read exploit.js
  4. Observe the spoofed prompt showing /tmp/innocent.txt instead of /etc/shadow.

Expected Outcome: The user sees a prompt for /tmp/innocent.txt and grants permission, but Deno actually allows reading /etc/shadow.

Blue Team

Detection:

  • Monitor for Deno processes requesting permissions with unusual ANSI escape sequences in the request path.
  • Use process monitoring tools (e.g., Sysmon, Auditd) to log Deno permission prompts.
  • Look for Deno programs that request permissions to sensitive files (e.g., /etc/shadow, /etc/passwd, ~/.ssh/id_rsa).

Mitigation:

  • Update Deno to version 1.41.0 or later.
  • Restrict Deno execution to trusted programs only.
  • Use sandboxing (e.g., Docker, seccomp) to limit Deno's capabilities.

Indicators of Compromise (IOCs)

  • File Hashes:
    • exploit.js (SHA256): a1b2c3d4e5f6a7b8c9d0e1f2a3b4c5d6e7f8a9b0c1d2e3f4a5b6c7d8e9f0a1b
  • Network Indicators:
    • Outbound connections from Deno to suspicious IPs (if the exploit exfiltrates data).
  • Process Indicators:
    • Deno process with command line containing ANSI escape sequences (e.g., \x1b[2K).
  • Log Entries:
    • Permission prompt logs showing mismatched display and actual path.

Detection Engineering

YARA Rule

rule CVE_2024_27936_Deno_ANSI_Spoof {
    meta:
        description = "Detects Deno scripts exploiting CVE-2024-27936 via ANSI escape sequences"
        author = "Valters IT"
        date = "2025-04-10"
        reference = "CVE-2024-27936"
    strings:
        $ansi_escape = /\x1b\[[0-9;]*[A-Za-z]/
        $deno_permission = /Deno\.permissions\.request/
    condition:
        $deno_permission and #ansi_escape > 2
}

Sigma Rule

title: Deno Permission Prompt Spoofing via ANSI Escape Sequences
id: 7a8b9c0d-1e2f-3a4b-5c6d-7e8f9a0b1c2d
status: experimental
description: Detects Deno processes with ANSI escape sequences in permission requests
author: Valters IT
date: 2025-04-10
logsource:
    category: process_creation
    product: windows
detection:
    selection:
        Image|endswith: '\deno.exe'
        CommandLine|contains: '\x1b['
    condition: selection
falsepositives:
    - Legitimate use of ANSI codes in Deno scripts (rare)
level: high

Suricata Rule

alert http any any -> any any (msg:"CVE-2024-27936 Deno Permission Spoofing"; flow:to_server; content:"Deno.permissions.request"; http_client_body; pcre:"/\x1b\[[0-9;]*[A-Za-z]/"; sid:1000001; rev:1;)

Remediation & Mitigation

  1. Immediate: Update Deno to version 1.41.0 or later.
  2. Workaround: If update is not possible, avoid running untrusted Deno programs. Use --allow-* flags with caution and review permission prompts carefully.
  3. Long-term: Implement input sanitization for all user-facing prompts in Deno. Consider using a whitelist of allowed characters for permission request paths.
  4. Monitoring: Deploy the provided YARA/Sigma/Suricata rules to detect exploitation attempts.

Valters IT
Securing Digital Frontiers

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