CVE-2026-31156: A path injection vulnerability exists in OpenPLC v3 (2c82b0e79c53f8c1f1458eee15fec173400d6e1a) as the binar...
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.
Security readout for executives and security teams
Plain-English summary
CVE-2026-31156 affects OpenPLC v3 at a specified commit. A helper binary built from glue_generator.cpp accepts file paths from command-line input without validating them, allowing an authenticated attacker to read files the process can access. The CVE is rated medium, mainly because it requires privileges but can expose sensitive information.
Executive priority
Prioritize for environments where OpenPLC supports operational technology, lab automation, or sensitive file-bearing hosts. Treat as a confidentiality risk requiring access control review and vendor guidance tracking, not an emergency unless untrusted users can reach the affected workflow.
Technical view
The flaw is a CWE-22 path injection issue. User-controlled path parameters are passed directly into file APIs such as fopen, ifstream, and ofstream. The CVSS 3.1 score is 6.5 with network attack vector, low complexity, low privileges required, no user interaction, unchanged scope, and high confidentiality impact.
Likely exposure
Exposure is most relevant where OpenPLC v3 deployments include the affected glue_generator.cpp-built binary and allow low-privileged users or network-reachable workflows to supply its command-line path parameters. The source bundle does not provide CPEs, packaged version ranges, or deployment-specific exposure details.
Exploitation context
The CVE states an attacker can construct a malicious path to read arbitrary readable files. No CISA KEV listing or cited source in the bundle indicates active exploitation in the wild. The referenced GitHub page should be treated as public vulnerability detail, but not proof of broad exploitation.
Researcher notes
Evidence identifies OpenPLC v3 at commit 2c82b0e79c53f8c1f1458eee15fec173400d6e1a, but the affected product metadata is incomplete. The source bundle names no patch, fixed version, or official advisory beyond the CVE and GitHub reference. Avoid assuming broader OpenPLC versions are affected without confirmation.
Mitigation direction
Check OpenPLC project guidance for a fixed commit, release, or maintainer workaround.
Restrict who can invoke the affected binary or workflows passing file path arguments.
Run the OpenPLC process with least-privilege filesystem access.
Use sandboxing or container controls to limit readable sensitive files.
Monitor for unusual file reads by OpenPLC-related processes.
Validation and detection
Inventory OpenPLC v3 deployments and identify the source commit or build provenance.
Determine whether the glue_generator.cpp-built binary exists in deployed systems.
Review local permissions for users or services able to pass command-line path arguments.
Check process filesystem privileges and access to sensitive files.
Track the CVE record and referenced repository for remediation updates.
Generated from the cited source records. This long-tail analysis has not been individually reviewed by a named human.
Potential ATT&CK relevance
Conservative CVE-to-ATT&CK context
These mappings and lookup hints may be relevant to the vulnerability behavior, CWE, affected product, or exposure path. Glexia-inferred context is not an official MITRE, ATT&CK, CWE, or CVE Program mapping.
ATT&CK lookup starting points
Use these exact CWE pages and searches to review the Glexia ATT&CK library from this CVE's weakness and description context.
cwe · medium confidence lookup
CWE-22: File access and web shell behavior lookup
File traversal and upload weaknesses can lead teams to review file, web shell, execution, and collection telemetry. Open the exact CWE lookup page first, then review the ATT&CK searches from that MITRE weakness context. This is a Glexia lookup hint, not an official ATT&CK mapping.
These fields come from the CVE record and ADP containers, not from Glexia's Take. They preserve time-varying source decisions such as CISA SSVC, KEV status, CVSS metrics, and provider references.
We collect every scored CVSS vector available in the official CNA and ADP containers. When more than one version is present, the table keeps the source vectors side by side instead of collapsing them into the highest score.
CWE links open Glexia weakness intelligence pages with official CWE context, developer remediation guidance, and related CVE mappings.
CWE-22 · source CWE mapping
Improper Limitation of a Pathname to a Restricted Directory ('Path Traversal')
Improper Limitation of a Pathname to a Restricted Directory ('Path Traversal') represents a recurring weakness pattern that can create exploitable paths when design, validation, or implementation controls are missing.