GHSA-QPRQ-675R-82H6
Vulnerability from github – Published: 2026-08-05 15:32 – Updated: 2026-08-05 15:32OpenPLC 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.
{
"affected": [],
"aliases": [
"CVE-2026-71268"
],
"database_specific": {
"cwe_ids": [
"CWE-22"
],
"github_reviewed": false,
"github_reviewed_at": null,
"nvd_published_at": "2026-08-05T13:24:51Z",
"severity": "CRITICAL"
},
"details": "OpenPLC Runtime v3\u0027s 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(\u0027./core\u0027, 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 \u003ccommand\u003e*)` 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.",
"id": "GHSA-qprq-675r-82h6",
"modified": "2026-08-05T15:32:20Z",
"published": "2026-08-05T15:32:20Z",
"references": [
{
"type": "ADVISORY",
"url": "https://nvd.nist.gov/vuln/detail/CVE-2026-71268"
},
{
"type": "WEB",
"url": "https://github.com/thiagoralves/OpenPLC_v3"
},
{
"type": "WEB",
"url": "https://github.com/thiagoralves/OpenPLC_v3/blob/master/webserver/openplc.py"
}
],
"schema_version": "1.4.0",
"severity": [
{
"score": "CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:C/C:H/I:H/A:H",
"type": "CVSS_V3"
}
]
}
Sightings
| Author | Source | Type | Date | Other |
|---|
Nomenclature
- Seen: The vulnerability was mentioned, discussed, or observed by the user.
- Confirmed: The vulnerability has been validated from an analyst's perspective.
- Published Proof of Concept: A public proof of concept is available for this vulnerability.
- Exploited: The vulnerability was observed as exploited by the user who reported the sighting.
- Patched: The vulnerability was observed as successfully patched by the user who reported the sighting.
- Not exploited: The vulnerability was not observed as exploited by the user who reported the sighting.
- Not confirmed: The user expressed doubt about the validity of the vulnerability.
- Not patched: The vulnerability was not observed as successfully patched by the user who reported the sighting.