CVE Professor
/
All CVEs
CVE-2026-136126

CVE-2026-136126 — C-icap C-icap-server (0.5.16) — CWE-415

HIGH CVSS 9.2 NVD

c-icap-server through 0.5.15 and 0.6.5 contains an out-of-bounds write in process_encapsulated() that allows unauthenticated attackers to corrupt heap memory by sending six Encapsulated entities. Attackers can send a single ICAP request whose sixth entity overwrites trash_entities[0], triggering use-after-free and double free in ci_request_destroy() during teardown.

c-icap-server through 0.5.15 and 0.6.5 contains an out-of-bounds write in process_encapsulated() that allows unauthenticated attackers to corrupt heap memory by sending six Encapsulated entities. Attackers can send a single ICAP request whose sixth entity overwrites trash_entities[0], triggering use-after-free and double free in ci_request_destroy() during teardown.

CVSS v3.1 Vector Metrics
CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:H/I:H/A:H
Attack Vector Network AV:N
Attack Complexity High AC:H
Privileges Req. None PR:N
User Interaction None UI:N
Scope Unchanged S:U
Confidentiality High C:H
Integrity High I:H
Availability High A:H
AI Security Analysis & Remediation

🎯 What is this vulnerability?

This vulnerability is a Heap Corruption flaw, specifically classified as CWE-415: Double Free (though the description also highlights an Out-of-Bounds Write leading to Use-After-Free). It resides in the process_encapsulated() function of the c-icap-server software.

The core technical failure is a logic error in how the server manages memory for ICAP (Internet Content Adaptation Protocol) request entities. The server maintains a data structure, likely an array or list, to track "trash" entities (entities that have been processed and are pending cleanup). The variable trash_entities[0] suggests a fixed-size buffer or a specific slot in a management structure.

The flaw occurs when an attacker sends a single ICAP request containing six Encapsulated entities. The server's parsing logic fails to properly bound-check or manage the lifecycle of these entities. Specifically, the processing of the sixth entity causes an out-of-bounds write that corrupts the memory pointer or structure associated with trash_entities[0].

During the teardown phase, when the server calls ci_request_destroy() to clean up the request, it attempts to free the memory associated with the entities. Because the memory pointer for the first entity was corrupted (overwritten) by the sixth entity's processing, the server attempts to free an invalid or already-freed memory address. This triggers a Use-After-Free and subsequently a Double Free condition. In C/C++ applications, heap corruption of this nature often leads to arbitrary code execution if the attacker can control the contents of the overwritten memory or influence the heap layout.

⚡ Attack Chain

1. Discovery & Reconnaissance

  • Service Identification: The attacker scans for open port 1344 (the default port for ICAP).
  • Version Fingerprinting: The attacker sends a benign ICAP request (e.g., REQMOD) and inspects the Server: header or error messages to identify the software as c-icap-server and confirm the version is 0.5.16 (or <= 0.5.15 / 0.6.5).
  • Capability Check: The attacker verifies that the server accepts Encapsulated headers, which are standard in ICAP for multipart requests.
  • 2. Exploitation

    The attacker crafts a single ICAP request containing six Encapsulated entities. The exact binary payload required to achieve reliable code execution depends on the specific heap layout and ASLR bypass techniques, but the structural trigger is the count of entities.

    Illustrative PoC (Conceptual):
    Note: The following is an illustrative example of the ICAP protocol structure required to trigger the bug. The specific byte offsets for the "sixth entity" to overwrite trash_entities[0] would require reverse engineering of the specific c-icap-server binary version.

    REQMOD / HTTP/1.0
    Host: target.example.com
    Encapsulated: req=0, req=100, req=200, req=300, req=400, req=500
    Content-Length: 1000
    
    [Entity 1 Data: 100 bytes]
    [Entity 2 Data: 100 bytes]
    [Entity 3 Data: 100 bytes]
    [Entity 4 Data: 100 bytes]
    [Entity 5 Data: 100 bytes]
    [Entity 6 Data: 100 bytes - Crafted to corrupt trash_entities[0]]

    Mechanism:
    1. The server parses the Encapsulated header and allocates memory for six entities.
    2. As it processes entities 1-5, it manages the trash_entities list correctly.
    3. When processing the sixth entity, a buffer overflow or logic error in process_encapsulated() writes data beyond the intended buffer, corrupting the metadata or pointer stored at trash_entities[0].
    4. The request processing completes, and the server initiates teardown via ci_request_destroy().
    5. ci_request_destroy() iterates through the entity list. It attempts to free() the pointer stored in trash_entities[0].
    6. Because this pointer was corrupted, the free() call operates on invalid memory, causing a crash or, if the attacker has controlled the heap layout, executing shellcode.

    Curl Command (Illustrative):

    # Note: This is a structural example. The actual payload requires precise byte manipulation.
    curl -X "REQMOD" \
      -H "Host: target.example.com" \
      -H "Encapsulated: req=0, req=100, req=200, req=300, req=400, req=500" \
      --data-binary @crafted_payload.bin \
      http://target.example.com:1344/

    3. Post-exploitation

  • Code Execution: If the heap corruption is successfully exploited for code execution, the attacker gains the privileges of the c-icap-server process (often root or a dedicated icap user).
  • Privilege Escalation: If the server runs as a non-root user, the attacker may leverage local privilege escalation vulnerabilities (e.g., kernel exploits) to gain root access.
  • Persistence: The attacker can install a rootkit, modify system binaries, or create a backdoor in the ICAP server configuration.
  • Lateral Movement: With access to the ICAP server, which often sits between clients and upstream servers, the attacker can intercept, modify, or exfiltrate traffic passing through the proxy.
  • 🌍 Real World Impact

  • Confidentiality (High): An attacker who achieves code execution can read memory, access configuration files (containing credentials for upstream servers), and intercept sensitive data flowing through the ICAP proxy.
  • Integrity (High): The attacker can modify traffic, inject malicious content, or alter system files.
  • Availability (High): The primary immediate impact is a Denial of Service (DoS). The double-free/use-after-free will almost certainly crash the c-icap-server process. If the server is not configured to auto-restart, this results in a complete outage of the ICAP service. Even with auto-restart, repeated exploitation can cause resource exhaustion.
  • Scope (None): The impact is confined to the vulnerable c-icap-server instance. It does not directly compromise other systems unless the attacker uses the compromised server as a pivot.
  • Practical Consequences:

  • Outage: Critical for environments relying on ICAP for content filtering, malware scanning, or caching.

  • Data Breach: Exposure of user credentials or sensitive data if the server has access to such information.

  • Supply Chain Risk: If the ICAP server is used to modify content (e.g., injecting ads or scripts), the attacker could compromise end-user systems.
  • 🛡️ Remediation & Mitigation

    1. Patching

  • Affected Versions: c-icap-server through 0.5.15 and 0.6.5.
  • Recommendation: Upgrade to the latest stable version of c-icap-server where the process_encapsulated() function has been fixed to properly manage entity memory and prevent out-of-bounds writes. Check the official c-icap project repository for the specific patch release.
  • 2. Workarounds

  • Disable ICAP: If ICAP functionality is not strictly required, disable the service or remove it from the network path.
  • Access Control: Restrict access to port 1344 to trusted internal networks only. Use firewall rules (iptables/nftables) to block external access.
  • # Example iptables rule to block external access to ICAP
        iptables -A INPUT -p tcp --dport 1344 -s 0.0.0.0/0 -j DROP
        iptables -A INPUT -p tcp --dport 1344 -s 192.168.1.0/24 -j ACCEPT
  • WAF/ModSecurity: While a WAF cannot fully prevent this low-level memory corruption, it can detect and block requests with an unusually high number of Encapsulated entities.
  • # ModSecurity Rule (Illustrative)
        SecRule REQUEST_HEADERS:Encapsulated "@rx req=[0-9]+.*req=[0-9]+.*req=[0-9]+.*req=[0-9]+.*req=[0-9]+.*req=[0-9]+" \
            "id:100001,phase:1,deny,status:403,msg:'ICAP Encapsulated Entity Overflow Attempt'"

    Note: This rule is a heuristic and may produce false positives. It is not a substitute for patching.

    3. Detection

  • Log Analysis: Monitor c-icap-server logs for crashes, segmentation faults, or abnormal termination messages.
  • * IoC: Segmentation fault, double free or corruption, invalid pointer in server logs.
  • Network Traffic: Look for ICAP requests with more than 5 Encapsulated entities.
  • * IoC: Encapsulated: req=0, req=100, req=200, req=300, req=400, req=500 (or similar patterns with 6+ entities).
  • System Monitoring: Monitor for unexpected child processes spawned by the c-icap-server user, which could indicate successful code execution.
  • ⚠️ Urgency

  • CVSS Score: 9.2 (Critical)
  • CISA KEV: No (Not currently listed in the Known Exploited Vulnerabilities catalog, but this does not mean it is not being exploited in the wild).
  • Exploit Complexity: High (AC:H). This indicates that while the vulnerability is critical, it requires specific conditions (precise heap layout, ASLR bypass) to exploit reliably for code execution. However, for DoS, the complexity is lower.
  • Priority: Immediate Patching Recommended.
* For DoS: High priority. An unauthenticated attacker can easily crash the service. * For RCE: Critical priority. If the server is exposed to the internet or untrusted networks, assume it is at risk of compromise. Even with high complexity, sophisticated threat actors may have developed reliable exploits.

Action Plan:
1. Immediately restrict network access to the ICAP server to trusted internal IPs only.
2. Apply the vendor patch or upgrade to the latest version.
3. Monitor logs for signs of exploitation attempts.
4. If the server was exposed, perform a full forensic investigation to determine if compromise occurred.

[🤖 CVE Professor AI Security Engine]

Target Reconnaissance Queries (FOFA & Shodan)

FOFA Query

app="c-icap c-icap-server"
PoC & Exploit Intelligence (GitHub)
cveForge/CVE-2026-136126 Python 2026-11-24
PoC for CVE-2026-136126 — c-icap-server Heap OOB Write DoS/RCE (CVSS 8.1)
Technical reference / advisory repository for CVE-2026-136126
Technical reference / advisory repository for CVE-2026-136126
Technical reference / advisory repository for CVE-2026-136126
Technical reference / advisory repository for CVE-2026-136126
Technical reference / advisory repository for CVE-2026-136126
CVSS Score
9.2 / 10 · CVSS HIGH
Weakness Types (CWE)
CWE-415
Affected Products (1)
c-icap:c-icap-server (0.5.16)
Related CVEs
5.8
CVE-2026-144210
In Eclipse Safe Open Vehicle Core (S-CORE) Kyron versions 0.0.3 through 0.2.0, `SpmcStealQueue::fetch_from` in
9.3
CVE-2026-144337
osTicket before 1.17.9 and 1.18.0 before 1.18.5 contains an unauthenticated stored cross-site scripting vulner
9.2
CVE-2026-144579
curl_cffi 0.15.0 through 0.17.0 contains a server-side request forgery protection bypass in allow_redirects='s
9.2
CVE-2026-144598
Homebox 0.22.0-rc.2 through 0.27.1 contains an authentication bypass vulnerability in UserService.LoginOIDC th
9.2
CVE-2026-145153
LangChain4j before 1.5.4-beta11, 1.11.12-beta19, 1.19.4-beta29, and 1.23.0-beta33 contains an injection vulner
9.1
CVE-2026-144956
Hoverfly before 1.12.17 contains an improper certificate validation vulnerability in GetHttpClient in core/htt
8.8
CVE-2026-77417
Local CI is a ground-up rewrite of the GitHub Actions orchestration layer that runs entirely on a personal mac