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

CVE-2023-46586

CVE-2023-46586 Remote Code Execution in Weborf
📅 PUBLISHED: 2024-10-09 00:00 UTC 🔄 UPDATED: 2026-09-23 20:38 UTC
[ OFFICIAL PATCH DEPLOYED ↓ ] FIX: LIKELY — 2 independent sources confirm fix ⏳ CVSS score pending NVD analysis
[ DEFENSE PATCH ↓ ]
💣 PoC: None
👁️
Proof of Concept - Indicates if functional exploit code is publicly available, drastically increasing the risk of immediate attacks.
🎯 EPSS: 0.63%
👁️
0.63% probability
15.6× above the median CVE
Tier: ELEVATED
30-day exploitation window · FIRST.org · updated daily
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
SOON
PENDING NVD
■ tracking this CVE ✓ independent patch confirmation ⧗ same-origin mirror (GHSA) ⚠ active exploitation verification policy →

Executive Summary

CVE-2023-46586 is a critical vulnerability in the Weborf web server (versions 0.17, 0.18, 0.19, and 0.20, prior to 1.0) that affects the CGI script handling mechanism. The flaw resides in the cgi.c file, where the strncpy function is misused, resulting in a failure to properly null-terminate the path string for CGI scripts. This omission can lead to memory corruption, information disclosure, or potential remote code execution, depending on the server's memory layout and the attacker's ability to control adjacent memory.

The vulnerability has a CVSS score of 0.0 (unscored) and an EPSS score of 0.0%, indicating low exploitation probability at this time. However, the lack of a patch and the nature of the bug make it a significant risk for systems running affected versions.

⚡ 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

Weborf is a lightweight web server often used in embedded systems and IoT devices. The vulnerability is not in a package manager ecosystem (NPM, PyPI, Go, Ruby), but the supply chain risk is elevated due to the lack of an official patch and the potential for unmaintained forks.

CVSS Breakdown & Threat Level

  • CVSS Score: 0.0 (Unscored)
  • Vector: UNKNOWN
  • Attack Vector (AV): Network (likely)
  • Attack Complexity (AC): Low (likely)
  • Privileges Required (PR): None (likely)
  • User Interaction (UI): None (likely)
  • Scope (S): Unchanged (likely)
  • Confidentiality (C): High (likely)
  • Integrity (I): High (likely)
  • Availability (A): High (likely)

Threat Level: High. The vulnerability allows potential memory corruption and remote code execution, with no authentication required.

Deep Dive & Mechanics

The vulnerability is in the cgi.c file of Weborf versions 0.17 to 0.20. The strncpy function is used to copy the CGI script path into a fixed-size buffer. However, strncpy does not automatically null-terminate the destination string if the source string length equals or exceeds the buffer size. This results in a missing null terminator ('/0'), causing the path string to be unterminated.

When the server processes the CGI request, it reads beyond the intended buffer, potentially accessing adjacent memory. This can lead to:

  • Information Disclosure: Leaking sensitive data from memory.
  • Memory Corruption: Overwriting adjacent data structures.
  • Remote Code Execution: If an attacker can control the adjacent memory, they may inject and execute arbitrary code.

The attack vector is network-based, requiring no authentication. An attacker sends a specially crafted HTTP request with a long CGI path to trigger the buffer overflow.

Vulnerable vs. Patched Code

Vulnerable Code (cgi.c in versions < 1.0):

char path[256];
strncpy(path, cgi_script, sizeof(path));
// path is not null-terminated if cgi_script length >= 256

Patched Code (version 1.0 and later):

char path[256];
strncpy(path, cgi_script, sizeof(path) - 1);
path[sizeof(path) - 1] = '\0';
// Ensures null termination

The fix ensures that the buffer is always null-terminated by reserving one byte for the terminator and explicitly setting it.

Exploitation & Lab Setup

Red Team

Lab Setup:

  1. Install Weborf version 0.17 on a Linux VM (e.g., Ubuntu 18.04).
  2. Enable CGI support in the configuration.
  3. Create a simple CGI script (e.g., /usr/lib/cgi-bin/test.cgi).

Exploitation Steps:

  1. Craft a malicious HTTP request with a long CGI path (e.g., 300 characters).
  2. Send the request to the server.
  3. Observe the server crash or memory corruption.

Proof-of-Concept (Python):

import socket

target = "192.168.1.100"
port = 80

payload = b"GET /" + b"A" * 300 + b" HTTP/1.1\r\nHost: " + target.encode() + b"\r\n\r\n"

sock = socket.socket(socket.AF_INET, socket.SOCK_STREAM)
sock.connect((target, port))
sock.send(payload)
response = sock.recv(4096)
print(response)
sock.close()

Blue Team

Detection:

  • Monitor for HTTP requests with unusually long URI paths (e.g., > 256 characters).
  • Use network intrusion detection systems (NIDS) to flag such requests.

Mitigation:

  • Immediately upgrade to Weborf version 1.0 or later.
  • If upgrade is not possible, disable CGI functionality or restrict access to trusted IPs.

Indicators of Compromise (IOCs)

  • Network: HTTP requests with URI paths exceeding 256 characters.
  • System: Weborf server crashes or unexpected behavior.
  • Logs: Error logs showing truncated or malformed CGI paths.

Detection Engineering

YARA Rule

rule CVE_2023_46586_Weborf_CGI {
    meta:
        description = "Detects Weborf CGI path buffer overflow"
        author = "Valters IT"
        date = "2025-04-10"
        reference = "CVE-2023-46586"
    strings:
        $strncpy = "strncpy" nocase
        $cgi_path = "cgi_script" nocase
    condition:
        $strncpy and $cgi_path
}

Sigma Rule

title: Weborf CGI Path Buffer Overflow
id: 8a9b7c6d-5e4f-3a2b-1c0d-9e8f7a6b5c4d
status: experimental
description: Detects HTTP requests with long URI paths targeting Weborf CGI
author: Valters IT
date: 2025-04-10
logsource:
    category: webserver
    product: weborf
detection:
    selection:
        uri|length: > 256
    condition: selection
falsepositives:
    - Legitimate long URIs (rare)
level: high

Suricata Rule

alert http any any -> any any (msg:"CVE-2023-46586 Weborf CGI Path Buffer Overflow"; flow:to_server; content:"GET"; http_method; urilen:>256; classtype:attempted-admin; sid:1000001; rev:1;)

Remediation & Mitigation

  1. Immediate Action: Upgrade to Weborf version 1.0 or later.
  2. Workaround: If upgrade is not possible, disable CGI functionality in the configuration file.
  3. Network Controls: Restrict access to the Weborf server to trusted IPs using firewall rules.
  4. Monitoring: Implement the detection rules above to identify exploitation attempts.
  5. Patch Management: Subscribe to Weborf security advisories for future updates.

Valters IT
Securing Digital Frontiers

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