← Back to CVE Explorer

CVE-2026-31156

Full vulnerability record from the local CVENow database.

Description

A path injection vulnerability exists in OpenPLC v3 (2c82b0e79c53f8c1f1458eee15fec173400d6e1a) as the binary program compiled from glue_generator.cpp does not perform any validation on the file path parameters passed via the command line. The user-controlled input parameters are directly passed to the underlying file operation functions (fopen/ifstream/ofstream) for file reading and writing. An attacker can exploit this vulnerability by constructing a malicious path to read arbitrary readable files.

Severity
MEDIUM
CVSS score
6.5 (v3.1)
Vulnerability status
Modified
Source identifier
Published
2026-05-13 16:16:38.763000
Last modified
2026-10-19 22:10:00.130000
View original CVE JSON
{
  "id": "CVE-2026-31156",
  "sourceIdentifier": "[email protected]",
  "published": "2026-05-13T16:16:38.763",
  "lastModified": "2026-10-19T22:10:00.130",
  "vulnStatus": "Modified",
  "cveTags": [],
  "descriptions": [
    {
      "lang": "en",
      "value": "A path injection vulnerability exists in OpenPLC v3 (2c82b0e79c53f8c1f1458eee15fec173400d6e1a) as the binary program compiled from glue_generator.cpp does not perform any validation on the file path parameters passed via the command line. The user-controlled input parameters are directly passed to the underlying file operation functions (fopen/ifstream/ofstream) for file reading and writing. An attacker can exploit this vulnerability by constructing a malicious path to read arbitrary readable files."
    },
    {
      "lang": "es",
      "value": "Existe una vulnerabilidad de inyección de ruta en OpenPLC v3 (2c82b0e79c53f8c1f1458eee15fec173400d6e1a) ya que el programa binario compilado de glue_generator.cpp no realiza ninguna validación en los parámetros de ruta de archivo pasados a través de la línea de comandos. Los parámetros de entrada controlados por el usuario se pasan directamente a las funciones subyacentes de operación de archivos (fopen/ifstream/ofstream) para lectura y escritura de archivos. Un atacante puede explotar esta vulnerabilidad construyendo una ruta maliciosa para leer archivos arbitrarios legibles."
    }
  ],
  "affected": [
    {
      "source": "[email protected]",
      "affectedData": [
        {
          "vendor": "n/a",
          "product": "n/a",
          "versions": [
            {
              "version": "n/a",
              "status": "affected"
            }
          ]
        }
      ]
    }
  ],
  "metrics": {
    "cvssMetricV31": [
      {
        "source": "134c704f-9b21-4f2e-91b3-4a467353bcc0",
        "type": "Secondary",
        "cvssData": {
          "version": "3.1",
          "vectorString": "CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:H/I:N/A:N",
          "baseScore": 6.5,
          "baseSeverity": "MEDIUM",
          "attackVector": "NETWORK",
          "attackComplexity": "LOW",
          "privilegesRequired": "LOW",
          "userInteraction": "NONE",
          "scope": "UNCHANGED",
          "confidentialityImpact": "HIGH",
          "integrityImpact": "NONE",
          "availabilityImpact": "NONE"
        },
        "exploitabilityScore": 2.8,
        "impactScore": 3.6
      }
    ],
    "ssvcV203": [
      {
        "source": "134c704f-9b21-4f2e-91b3-4a467353bcc0",
        "ssvcData": {
          "timestamp": "2026-05-14T13:56:11.488350Z",
          "id": "CVE-2026-31156",
          "options": [
            {
              "exploitation": "poc"
            },
            {
              "automatable": "no"
            },
            {
              "technicalImpact": "partial"
            }
          ],
          "role": "CISA Coordinator",
          "version": "2.0.3"
        }
      }
    ]
  },
  "weaknesses": [
    {
      "source": "134c704f-9b21-4f2e-91b3-4a467353bcc0",
      "type": "Secondary",
      "description": [
        {
          "lang": "en",
          "value": "CWE-22"
        }
      ]
    }
  ],
  "configurations": [
    {
      "operator": "AND",
      "nodes": [
        {
          "operator": "OR",
          "negate": false,
          "cpeMatch": [
            {
              "vulnerable": true,
              "criteria": "cpe:2.3:o:openplcproject:openplc_v3_firmware:2024-03-09:*:*:*:*:*:*:*",
              "matchCriteriaId": "41B53703-1846-4EBB-9033-0E839072034F"
            }
          ]
        },
        {
          "operator": "OR",
          "negate": false,
          "cpeMatch": [
            {
              "vulnerable": false,
              "criteria": "cpe:2.3:h:openplcproject:openplc_v3:-:*:*:*:*:*:*:*",
              "matchCriteriaId": "6861E863-E6AC-4BFB-8CDE-2328A045540D"
            }
          ]
        }
      ]
    }
  ],
  "references": [
    {
      "url": "https://github.com/unicorn-hyh/CVE-2026-31156",
      "source": "[email protected]",
      "tags": [
        "Exploit",
        "Third Party Advisory"
      ]
    },
    {
      "url": "https://github.com/unicorn-hyh/CVE-2026-31156",
      "source": "134c704f-9b21-4f2e-91b3-4a467353bcc0",
      "tags": [
        "Exploit",
        "Third Party Advisory"
      ]
    }
  ]
}