(Pwn2Own) Triangle MicroWorks SCADA Data Gateway Event Log Directory Traversal Arbitrary File Creation Vulnerability
The event log creation feature of Triangle MicroWorks SCADA Data Gateway did not properly validate a user-supplied path before using it in file operations, allowing arbitrary file creation. An attacker could combine this with other flaws to run code as root, though authentication is required and the existing authentication mechanism can be bypassed.
Originally disclosed on Zero Day Initiative
This vulnerability allows remote attackers to create arbitrary files on affected installations of Triangle MicroWorks SCADA Data Gateway. Although authentication is required to exploit this vulnerability, the existing authentication mechanism can be bypassed.
The full write-up lives on its author's site
It belongs to its author, so we link to it rather than copy it. The other two tabs are our own rewrites, checked against it.
Not written yet. The AI write-up for this report has not been written yet. The Original tab links to the source.
How it worked
Root cause
Likely the event log creation routine joins user-supplied path input into a file path without validating it, so the path can escape the intended directory.
Impact
An attacker could create arbitrary files on the installation and, chained with other vulnerabilities, execute code as root; authentication is required but the existing mechanism can be bypassed.
What the attacker needed
Network access to the gateway; authentication bypass; another flaw to reach code execution
The fix
The vendor issued an update to correct the vulnerability.
Explained by bugbounty.wiki with AI from the original and checked against quotes from it; it can still be wrong. Read the original before relying on a detail.
Not written yet. The AI write-up for this report has not been written yet. The Original tab links to the source.
This software keeps logs of events, and it builds the file path for a new log from input a user can influence. Because it never checks that the path stays inside the intended log folder, someone can make it write a file somewhere else on the machine. Writing files in the wrong place can later be turned into running their own code, but here that needs a second weakness to be useful.
What is Path traversal?
Input that builds a file path escapes the intended folder, reading or writing files the application should never touch.