VDE-2020-037
Vulnerability from csaf_beckhoffautomationgmbhcokg - Published: 2020-11-19 13:41 - Updated: 2025-05-22 13:03The default installation path of the TwinCAT XAR 3.1 software in all versions is underneath C:\TwinCAT. If the directory does not exist it and further subdirectories are created with permissions which allow every local user to modify the content. The default installation registers TcSysUI.exe for automatic execution upon log in of a user. If a less privileged user has a local account he or she can replace TcSysUI.exe. It will be executed automatically by another user during login. This is also true for users with administrative access. Consequently, a less privileged user can trick a higher privileged user into executing code he or she modified this way. By default Beckhoff's IPCs are shipped with TwinCAT software installed this way and with just a single local user configured. Thus the vulnerability exists if further less privileged users have been added.
{
"document": {
"acknowledgments": [
{
"organization": "CERT@VDE",
"summary": "coordination"
},
{
"organization": "Ayushman Dutta",
"summary": "reported"
}
],
"category": "csaf_security_advisory",
"csaf_version": "2.0",
"distribution": {
"tlp": {
"label": "WHITE",
"url": "https://www.first.org/tlp/"
}
},
"lang": "en-GB",
"notes": [
{
"category": "summary",
"text": "The default installation path and its permissions for the TwinCAT runtime allow a local user to replace or modify executables other users of the same system might execute. The issue does not apply for installations underneath C:\\Program Files.",
"title": "Summary"
},
{
"category": "description",
"text": "The default installation path of the TwinCAT software is underneath C:\\TwinCAT. If the directory does not exist it and further subdirectories are created with permissions which allow every local user to modify the content. The default installation registers TcSysUI.exe for automatic execution upon log in of a user. If a less privileged user has a local account he or she can replace TcSysUI.exe. It will be executed automatically by another user during login. This is also true for users with administrative access. Consequently, a less privileged user can trick a higher privileged user into executing code he or she modified this way. By default Beckhoff\u0027s IPCs are shipped with TwinCAT software installed this way and with just a single local user configured. Thus the vulnerability exists if further less privileged users have been added.",
"title": "Impact"
},
{
"category": "description",
"text": "Please consider the solution described with the next section (title \u0027Solution\u0027) for new installations only and installations for which it is acceptable to reinstall TwinCAT.\n\nFor existing installations a script is provided for download at the following link:\nhttps://download.beckhoff.com/download/Document/product-security/Advisories/advisory-2020-003/cve-2020-12510.zip external link\n\nIt changes the permissions of a directory of an already installed TwinCAT 3.1 installation. More precisely, it reads the current permissions of \u0027C:\\Program Files\u0027 and copies them to the directory \u00273.1\\System\u0027 underneath the installation path of TwinCAT (default \u0027C:\\TwinCAT\\3.1\\System\u0027).\n\nThe procedure to use that script is as follows:\n\n1. Download the script, unzip it, and copy it to the IPC.\n2. On the IPC log in as administrator and open a PowerShell (Windows-Key + R + \u0027PowerShell\u0027).\n3. At the PowerShell enter the following command to temporarily allow the execution of scripts: set-executionpolicy -ExecutionPolicy Unrestricted -Scope Process (The effect of this is limited to the life-time of the current shell window because of \u0027-Scope Process\u0027.)\n4. Then change to the path to where you downloaded the script and execute it: .\\cve-2020-12510.ps1 The expected output is \u0027Copied the permissions from C:\\Program Files to \\3.1\\System\u0027.\n5. Close the PowerShell and log out from the IPC as needed.\nIt is safe to apply the script several times. It is safe to run it during full operation of TwinCAT XAR 3.1. There is no need to reboot the IPC afterwards.\n\nThere is no need to periodically run the script. Future updates of TwinCAT 3.1 will either not touch the permissions which are set by the script or apply more appropriate ones.\n\nTo apply the procedure to a set of IPCs you can prepare a USB stick with the content of the ZIP file \u0027cve-2020- 12510.zip\u0027 (see download URL above). Then the procedure for each IPC is:\n\n1. Log in as administrator on the IPC.\n2. Open the USB stick with the File Explorer (formerly known as Windows Explorer).\n3. Double click on the file \u0027run-cve-2020-12510.bat\u0027. (This simply invokes the PowerShell to execute the script already described above.)",
"title": "Mitigation"
},
{
"category": "description",
"text": "Please consider the mitigation described with the section above for existing installations for operation.\n\nPlease consider to choose \u0027C:\\Program Files\\TwinCAT\u0027 during installation of TwinCAT 3.1. If you have installed it already then please uninstall and re-install it with the changed path. Please use the custom installation for this. That will automatically protect the binaries such that they can only be modified by an administrator.\n\nPlease mind that already installed projects underneath C:\\TwinCAT need to be moved. It is recommended to perform a backup of the complete device before such action. For security reasons, please remove the former content of C:\\TwinCAT at the end of this sequence. This will also prevent confusion.\n\nUpdate A (25.11.2020): Split into Mitigation and Solution",
"title": "Remediation"
}
],
"publisher": {
"category": "vendor",
"contact_details": "product-securityincident@beckhoff.com",
"name": "Beckhoff Automation GmbH \u0026 Co. KG",
"namespace": "https://www.beckhoff.com"
},
"references": [
{
"category": "external",
"summary": "CERT@VDE Security Advisories for Beckhoff Automation GmbH \u0026 Co. KG",
"url": "https://certvde.com/en/advisories/vendor/beckhoff/"
},
{
"category": "self",
"summary": "VDE-2020-037: Beckhoff: Privilege Escalation through TwinCat System Tray (TcSysUI.exe) - HTML",
"url": "https://certvde.com/en/advisories/VDE-2020-037/"
},
{
"category": "self",
"summary": "VDE-2020-037: Beckhoff: Privilege Escalation through TwinCat System Tray (TcSysUI.exe) - CSAF",
"url": "https://beckhoff.csaf-tp.certvde.com/.well-known/csaf/white/2020/vde-2020-037.json"
}
],
"title": "Beckhoff: Privilege Escalation through TwinCat System Tray (TcSysUI.exe)",
"tracking": {
"aliases": [
"VDE-2020-037"
],
"current_release_date": "2025-05-22T13:03:10.000Z",
"generator": {
"date": "2025-03-20T10:25:06.803Z",
"engine": {
"name": "Secvisogram",
"version": "2.5.21"
}
},
"id": "VDE-2020-037",
"initial_release_date": "2020-11-19T13:41:00.000Z",
"revision_history": [
{
"date": "2020-11-19T13:41:00.000Z",
"number": "1",
"summary": "Initial revision."
},
{
"date": "2021-11-11T07:28:00.000Z",
"number": "2",
"summary": "Update A"
},
{
"date": "2025-05-22T13:03:10.000Z",
"number": "3",
"summary": "Fix: added distribution, quotation mark"
}
],
"status": "final",
"version": "3"
}
},
"product_tree": {
"branches": [
{
"branches": [
{
"branches": [
{
"branches": [
{
"category": "product_version",
"name": "3.1",
"product": {
"name": "TwinCAT XAR with default installation path 3.1",
"product_id": "CSAFPID-51001"
}
}
],
"category": "product_name",
"name": "TwinCAT XAR with default installation path"
}
],
"category": "product_family",
"name": "Software"
}
],
"category": "vendor",
"name": "Beckhoff"
}
]
},
"vulnerabilities": [
{
"cve": "CVE-2020-12510",
"cwe": {
"id": "CWE-276",
"name": "Incorrect Default Permissions"
},
"notes": [
{
"category": "description",
"text": "The default installation path of the TwinCAT XAR 3.1 software in all versions is underneath C:\\TwinCAT. If the directory does not exist it and further subdirectories are created with permissions which allow every local user to modify the content. The default installation registers TcSysUI.exe for automatic execution upon log in of a user. If a less privileged user has a local account he or she can replace TcSysUI.exe. It will be executed automatically by another user during login. This is also true for users with administrative access. Consequently, a less privileged user can trick a higher privileged user into executing code he or she modified this way. By default Beckhoff\u0027s IPCs are shipped with TwinCAT software installed this way and with just a single local user configured. Thus the vulnerability exists if further less privileged users have been added.",
"title": "Vulnerability Description"
}
],
"product_status": {
"known_affected": [
"CSAFPID-51001"
]
},
"remediations": [
{
"category": "mitigation",
"details": "Please consider the solution described with the next section (title \u0027Solution\u0027) for new installations only and installations for which it is acceptable to reinstall TwinCAT.\n\nFor existing installations a script is provided for download at the following link:\nhttps://download.beckhoff.com/download/Document/product-security/Advisories/advisory-2020-003/cve-2020-12510.zip external link\n\nIt changes the permissions of a directory of an already installed TwinCAT 3.1 installation. More precisely, it reads the current permissions of \u0027C:\\Program Files\u0027 and copies them to the directory \u00273.1\\System\u0027 underneath the installation path of TwinCAT (default \u0027C:\\TwinCAT\\3.1\\System\u0027).\n\nThe procedure to use that script is as follows:\n\n1. Download the script, unzip it, and copy it to the IPC.\n2. On the IPC log in as administrator and open a PowerShell (Windows-Key + R + \u0027PowerShell\u0027).\n3. At the PowerShell enter the following command to temporarily allow the execution of scripts: set-executionpolicy -ExecutionPolicy Unrestricted -Scope Process (The effect of this is limited to the life-time of the current shell window because of \u0027-Scope Process\u0027.)\n4. Then change to the path to where you downloaded the script and execute it: .\\cve-2020-12510.ps1 The expected output is \u0027Copied the permissions from C:\\Program Files to \\3.1\\System\u0027.\n5. Close the PowerShell and log out from the IPC as needed.\nIt is safe to apply the script several times. It is safe to run it during full operation of TwinCAT XAR 3.1. There is no need to reboot the IPC afterwards.\n\nThere is no need to periodically run the script. Future updates of TwinCAT 3.1 will either not touch the permissions which are set by the script or apply more appropriate ones.\n\nTo apply the procedure to a set of IPCs you can prepare a USB stick with the content of the ZIP file \u0027cve-2020- 12510.zip\u0027 (see download URL above). Then the procedure for each IPC is:\n\n1. Log in as administrator on the IPC.\n2. Open the USB stick with the File Explorer (formerly known as Windows Explorer).\n3. Double click on the file \u0027run-cve-2020-12510.bat\u0027. (This simply invokes the PowerShell to execute the script already described above.)",
"product_ids": [
"CSAFPID-51001"
]
},
{
"category": "vendor_fix",
"details": "Please consider the mitigation described with the section above for existing installations for operation.\n\nPlease consider to choose \u0027C:\\Program Files\\TwinCAT\u0027 during installation of TwinCAT 3.1. If you have installed it already then please uninstall and re-install it with the changed path. Please use the custom installation for this. That will automatically protect the binaries such that they can only be modified by an administrator.\n\nPlease mind that already installed projects underneath C:\\TwinCAT need to be moved. It is recommended to perform a backup of the complete device before such action. For security reasons, please remove the former content of C:\\TwinCAT at the end of this sequence. This will also prevent confusion.\n\nUpdate A (25.11.2020): Split into Mitigation and Solution",
"product_ids": [
"CSAFPID-51001"
]
}
],
"scores": [
{
"cvss_v3": {
"attackComplexity": "LOW",
"attackVector": "LOCAL",
"availabilityImpact": "HIGH",
"baseScore": 7.3,
"baseSeverity": "HIGH",
"confidentialityImpact": "HIGH",
"environmentalScore": 7.3,
"environmentalSeverity": "HIGH",
"integrityImpact": "HIGH",
"privilegesRequired": "LOW",
"scope": "UNCHANGED",
"temporalScore": 7.3,
"temporalSeverity": "HIGH",
"userInteraction": "REQUIRED",
"vectorString": "CVSS:3.1/AV:L/AC:L/PR:L/UI:R/S:U/C:H/I:H/A:H",
"version": "3.1"
},
"products": [
"CSAFPID-51001"
]
}
],
"title": "CVE-2020-12510"
}
]
}
Sightings
| Author | Source | Type | Date |
|---|
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.