CVE-2026-71268
OpenPLC Runtime v3 Path Traversal in Structured Text FILE Directive Leading to Arbitrary File Write
Description
OpenPLC Runtime v3's compile_program function (webserver/openplc.py) parses directives from uploaded Structured Text (.st) program files and writes the referenced content to with no validation that file_path stays within the ./core directory. A path-validation function, validate_file_path, exists elsewhere in the codebase (webserver/credentials.py) but is never invoked from compile_program, leaving the sink unprotected.
INFO
Published Date :
Aug. 5, 2026, 1:24 p.m.
Last Modified :
Oct. 24, 2026, 3:10 p.m.
Remotely Exploit :
Yes !
Source :
309f9ea4-e3e9-4c6c-b79d-e8eb01244f2c
CVSS Scores
| Score | Version | Severity | Vector | Exploitability Score | Impact Score | Source |
|---|---|---|---|---|---|---|
| CVSS | 134c704f-9b21-4f2e-91b3-4a467353bcc0 | |||||
| CVSS 3.1 | CRITICAL | 309f9ea4-e3e9-4c6c-b79d-e8eb01244f2c |
Solution
- Validate all file paths before writing to the filesystem.
- Ensure the validate_file_path function is called.
- Change default hardcoded credentials immediately.
- Update to the latest patched version.
References to Advisories, Solutions, and Tools
Here, you will find a curated list of external links that provide in-depth
information, practical solutions, and valuable tools related to
CVE-2026-71268.
| URL | Resource |
|---|---|
| https://github.com/thiagoralves/OpenPLC_v3 | |
| https://github.com/thiagoralves/OpenPLC_v3/blob/master/webserver/openplc.py |
CWE - Common Weakness Enumeration
While CVE identifies
specific instances of vulnerabilities, CWE categorizes the common flaws or
weaknesses that can lead to vulnerabilities. CVE-2026-71268 is
associated with the following CWEs:
Common Attack Pattern Enumeration and Classification (CAPEC)
Common Attack Pattern Enumeration and Classification
(CAPEC)
stores attack patterns, which are descriptions of the common attributes and
approaches employed by adversaries to exploit the CVE-2026-71268
weaknesses.
We scan GitHub repositories to detect new proof-of-concept exploits. Following list is a collection of public exploits and proof-of-concepts, which have been published on GitHub (sorted by the most recently updated).
Results are limited to the first 15 repositories due to potential performance issues.
The following list is the news that have been mention
CVE-2026-71268 vulnerability anywhere in the article.
The following table lists the changes that have been made to the
CVE-2026-71268 vulnerability over time.
Vulnerability history details can be useful for understanding the evolution of a vulnerability, and for identifying the most recent changes that may impact the vulnerability's severity, exploitability, or other characteristics.
-
CVE Translated by [email protected]
Oct. 24, 2026
Action Type Old Value New Value Changed Translation Title: OpenPLC_v3 de thiagoralves, Description: La función compile_program() de OpenPLC Runtime v3 (webserver/openplc.py) analiza las directivas “(FILE:path content)” de los archivos de programa Structured Text (.st) cargados y escribe el contenido referenciado en “os.path.join(’./core’, file_path)” sin validación de que file_path permanezca dentro del directorio ./core. Un archivo .st manipulado que contiene una directiva como “(FILE:.. / .. / .. / etc/cron.d/x * * * * root [command]*)” escribe contenido controlado por el atacante en una ruta arbitraria del sistema de archivos, lo que permite la ejecución remota de código (por ejemplo, a través de cron o de las claves autorizadas de SSH). Una función de validación de rutas, validate_file_path(), existe en otra parte de la base de código (webserver/credentials.py) pero nunca se invoca desde compile_program(), dejando el ’sink’ desprotegido. OpenPLC se distribuye además con credenciales predeterminadas codificadas (openplc:openplc), lo que reduce la barrera práctica para la explotación. Title: OpenPLC_v3 de thiagoralves, Description: La función compile_program() de OpenPLC Runtime v3 (webserver/openplc.py) analiza las directivas “(FILE:path content)” de los archivos de programa Structured Text (.st) cargados y escribe el contenido referenciado en “os.path.join(’./core’, file_path)” sin validación de que file_path permanezca dentro del directorio ./core. Un archivo .st manipulado que contiene una directiva como “(FILE:.. / .. / .. / etc/cron.d/x * * * * root [command]*)” escribe contenido controlado por el atacante en una ruta arbitraria del sistema de archivos, lo que permite la ejecución remota de código (por ejemplo, a través de cron o de las claves autorizadas de SSH). Una función de validación de rutas, validate_file_path(), existe en otra parte de la base de código (webserver/credentials.py) pero nunca se invoca desde compile_program(), dejando el ’sink’ desprotegido. OpenPLC se distribuye además con credenciales predeterminadas codificadas (openplc:openplc), lo que reduce la barrera práctica para la explotación. -
CVE Translated by [email protected]
Oct. 23, 2026
Action Type Old Value New Value Added Translation Title: OpenPLC_v3 de thiagoralves, Description: La función compile_program() de OpenPLC Runtime v3 (webserver/openplc.py) analiza las directivas “(FILE:path content)” de los archivos de programa Structured Text (.st) cargados y escribe el contenido referenciado en “os.path.join(’./core’, file_path)” sin validación de que file_path permanezca dentro del directorio ./core. Un archivo .st manipulado que contiene una directiva como “(FILE:.. / .. / .. / etc/cron.d/x * * * * root [command]*)” escribe contenido controlado por el atacante en una ruta arbitraria del sistema de archivos, lo que permite la ejecución remota de código (por ejemplo, a través de cron o de las claves autorizadas de SSH). Una función de validación de rutas, validate_file_path(), existe en otra parte de la base de código (webserver/credentials.py) pero nunca se invoca desde compile_program(), dejando el ’sink’ desprotegido. OpenPLC se distribuye además con credenciales predeterminadas codificadas (openplc:openplc), lo que reduce la barrera práctica para la explotación. -
CVE Modified by 309f9ea4-e3e9-4c6c-b79d-e8eb01244f2c
Aug. 10, 2026
Action Type Old Value New Value Changed Description OpenPLC Runtime v3's compile_program() function (webserver/openplc.py) parses `(*FILE:path content*)` directives from uploaded Structured Text (.st) program files and writes the referenced content to `os.path.join('./core', file_path)` with no validation that file_path stays within the ./core directory. A crafted .st file containing a directive such as `(*FILE:../../../etc/cron.d/x * * * * root <command>*)` writes attacker-controlled content to an arbitrary filesystem path, enabling remote code execution (e.g. via cron or SSH authorized_keys). A path-validation function, validate_file_path(), exists elsewhere in the codebase (webserver/credentials.py) but is never invoked from compile_program(), leaving the sink unprotected. OpenPLC additionally ships with hardcoded default credentials (openplc:openplc), lowering the practical bar for exploitation. OpenPLC Runtime v3's compile_program function (webserver/openplc.py) parses directives from uploaded Structured Text (.st) program files and writes the referenced content to with no validation that file_path stays within the ./core directory. A path-validation function, validate_file_path, exists elsewhere in the codebase (webserver/credentials.py) but is never invoked from compile_program, leaving the sink unprotected. -
CVE Modified by 134c704f-9b21-4f2e-91b3-4a467353bcc0
Aug. 05, 2026
Action Type Old Value New Value Added SSVC {'id': 'CVE-2026-71268', 'role': 'CISA Coordinator', 'options': [{'exploitation': 'none'}, {'automatable': 'no'}, {'technicalImpact': 'total'}], 'version': '2.0.3', 'timestamp': '2026-08-05T15:41:39.300095Z'} -
New CVE Received by 309f9ea4-e3e9-4c6c-b79d-e8eb01244f2c
Aug. 05, 2026
Action Type Old Value New Value Added Affected [{'vendor': 'thiagoralves', 'product': 'OpenPLC_v3', 'versions': [{'status': 'affected', 'version': '0', 'versionType': 'custom', 'lessThanOrEqual': '*'}], 'programFiles': ['webserver/openplc.py'], 'defaultStatus': 'unaffected'}] Added Description OpenPLC Runtime v3's compile_program() function (webserver/openplc.py) parses `(*FILE:path content*)` directives from uploaded Structured Text (.st) program files and writes the referenced content to `os.path.join('./core', file_path)` with no validation that file_path stays within the ./core directory. A crafted .st file containing a directive such as `(*FILE:../../../etc/cron.d/x * * * * root <command>*)` writes attacker-controlled content to an arbitrary filesystem path, enabling remote code execution (e.g. via cron or SSH authorized_keys). A path-validation function, validate_file_path(), exists elsewhere in the codebase (webserver/credentials.py) but is never invoked from compile_program(), leaving the sink unprotected. OpenPLC additionally ships with hardcoded default credentials (openplc:openplc), lowering the practical bar for exploitation. Added CVSS V3.1 AV:N/AC:L/PR:L/UI:N/S:C/C:H/I:H/A:H Added CWE CWE-22 Added Reference https://github.com/thiagoralves/OpenPLC_v3 Added Reference https://github.com/thiagoralves/OpenPLC_v3/blob/master/webserver/openplc.py