Skip to content
Path traversal Advisory Intermediate CVE-2020-7495

(Pwn2Own) Schneider Electric EcoStructure Operator Terminal Expert ZIP Path Traversal Remote Code Execution Vulnerability

The software failed to validate paths inside ZIP files before using them in file operations, so a crafted archive could write files outside the intended location. An attacker could use this to run arbitrary code as the current process if the victim opened a malicious file or visited a malicious page.

Sharon Brizinov Follow

Originally disclosed on Zero Day Initiative

High 7.8 View original

The vulnerability allows remote attackers to execute arbitrary code on affected installations of Schneider Electric EcoStructure Operator Terminal Expert. User interaction is required to exploit this vulnerability in that the target must visit a malicious page or open a malicious file.

Sharon Brizinov, Amir Preminger of Claroty Research, on the Zero Day Initiative

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.

Written with AI from the full original report and checked against it passage by passage; anything it could not back up was removed or toned down. The original is the record. 3 min read.

Context

Schneider Electric EcoStructure Operator Terminal Expert is the affected product. The advisory describes a remote code execution vulnerability in affected installations of that software, triggered through the handling of ZIP files. The flaw lies in the handling of ZIP files: a user-supplied path is used in file operations without proper validation.

The advisory was published by the Zero Day Initiative and credited to Sharon Brizinov and Amir Preminger of Claroty Research.

Setup

The advisory does not describe any accounts, roles, tools or versions used during research. What it does state is the precondition for exploitation: user interaction is required, in that the target must visit a malicious page or open a malicious file. No further environment detail is given.

Finding it

The flaw is in the handling of ZIP files. The issue results from the lack of proper validation of a user-supplied path before that path is used in file operations. In other words, a user-supplied path is not checked before the application uses it in file operations.

Exploitation

The advisory does not publish a step-by-step exploitation walkthrough, payload or command. What it does describe is the following chain.

Step 1: Deliver the malicious input

The attacker must get the target to visit a malicious page or open a malicious file. This is the user interaction the advisory names as a requirement.

Step 2: Abuse ZIP path handling

The malicious input reaches the ZIP handling code where the path flaw sits. Because the user-supplied path is not properly validated before being used in file operations, the application acts on a path the attacker controls.

Step 3: Execute code

An attacker can leverage this vulnerability to execute code in the context of the current process. The advisory does not describe the specific files written, the paths used, or the resulting behaviour beyond code execution in that context.

Root cause

The mistake is the lack of proper validation of a user-supplied path prior to using it in file operations, specifically in the handling of ZIP files. The advisory does not describe the code involved or which defence, if any, was present and failed.

Impact

A remote attacker can execute arbitrary code on affected installations of Schneider Electric EcoStructure Operator Terminal Expert, in the context of the current process. Exploitation requires user interaction: the target must visit a malicious page or open a malicious file. The advisory does not state which privileges the current process runs with, nor any other limiting condition.

Fix

Schneider Electric issued an update to correct this vulnerability. The vendor's details are at:

Text
https://www.se.com/ww/en/download/document/SEVD-2020-133-04/

The advisory does not describe what the update changed in the code.

Variants to test

The advisory gives no variant detail beyond the ZIP path handling flaw itself. Following from the described weakness, the things worth trying on similar targets are:

  1. Archive entries whose paths are not validated before file operations. A positive result is the application acting on an attacker-controlled path rather than confining it to the intended extraction location.
  2. The same untrusted-path pattern in other archive formats the product accepts. A positive result is the same behaviour outside ZIP handling.
  3. The delivery conditions named in the advisory: a malicious page or a malicious file that the user must open. A positive result is code execution in the context of the current process after that interaction.

Hunting notes

The advisory names ZIP file handling as the location of the flaw and user interaction as the delivery condition. The precondition to keep in mind during triage is user interaction: a report needs the target to visit a malicious page or open a malicious file. The advisory does not describe the researcher's recon signals or how impact was demonstrated to the program beyond the code execution outcome it records.

Disclosure timeline

  • 2020-01-30: Vulnerability reported to vendor
  • 2020-05-14: Coordinated public release of advisory

Written with AI from the full original report and checked against it passage by passage; anything it could not back up was removed or toned down. The original is the record. 9 min read.

What happened, in plain words

Schneider Electric makes a piece of software called EcoStructure Operator Terminal Expert. It is the software named as the affected product in the advisory. The advisory describes a flaw in how that software handles ZIP files, the compressed archives you may know from downloading a folder of files as a single .zip.

A ZIP file is really a container. Inside it are entries, and each entry has a name that includes a path, something like folder/file.txt. When software unpacks a ZIP, it reads those names and writes the files to disk. If it trusts the name without checking it, an attacker can supply a path the software should not act on. That is called path traversal: the path travels out of its intended area.

In this case the advisory says the software does not properly validate a user-supplied path before using it in file operations. Because of that, an attacker can get the software to act on a path the attacker controls. The result is remote code execution: the attacker can run their own code on the affected installation, in the context of the current process.

There is a catch for the attacker: the user has to do something. The advisory says user interaction is required, in that the target must visit a malicious page or open a malicious file. So this is not a bug that can be fired at a machine from across the internet with no help from the person using it.

The advisory was published by the Zero Day Initiative and credited to Sharon Brizinov and Amir Preminger of Claroty Research. CVSS is a standard way of scoring how serious a vulnerability is, from 0 to 10.

Context

Schneider Electric EcoStructure Operator Terminal Expert is the affected product. The advisory describes a remote code execution vulnerability in affected installations of that software, triggered through the handling of ZIP files. The flaw lies in the handling of ZIP files: a user-supplied path is used in file operations without proper validation.

To unpack that for a newcomer: an installation is a copy of the software installed on a computer. Remote means the attacker does not need to be sitting at that computer. Code execution means the attacker's instructions run on that computer. A user-supplied path is simply a piece of text that comes from the user or from a file the user opens, and that describes where a file should be read from or written to. File operations are the actions software takes on files: open, read, write, delete. Validation is the checking step: before using a path, the software should confirm it is allowed, for example that it stays inside the folder it is supposed to use.

The advisory was published by the Zero Day Initiative as part of Pwn2Own, credited to Sharon Brizinov and Amir Preminger of Claroty Research, with a CVSS score of 7.8 (high severity).

Setup

The advisory does not describe any accounts, roles, tools or versions used during research. What it does state is the precondition for exploitation: user interaction is required, in that the target must visit a malicious page or open a malicious file. No further environment detail is given.

In plain terms, the only setup detail that matters here is on the victim's side. The person using the software has to be persuaded to open something: a web page the attacker controls, or a file the attacker has prepared. Think of it like a parcel: the attacker cannot put it on your desk, but they can send it to you and hope you open it.

Finding it

The flaw is in the handling of ZIP files. The issue results from the lack of proper validation of a user-supplied path before that path is used in file operations. In other words, a user-supplied path is not checked before the application uses it in file operations.

A useful comparison is a filing cabinet. If a clerk is told "put this document in the folder named on the label" and never checks the label, someone can write a label that says "the manager's private drawer" and the clerk will obediently file it there. The label is the path; the clerk is the software; the missing check is the validation.

Exploitation

The advisory does not publish a step-by-step exploitation walkthrough, payload or command. What it does describe is the following chain.

Step 1: Deliver the malicious input

The attacker must get the target to visit a malicious page or open a malicious file. This is the user interaction the advisory names as a requirement.

Why this step exists: the attacker has no direct access to the victim's computer, so they need a delivery route. A web page or a file is something a user can be tricked into opening, for example through a link in an email or a message. This is often called social engineering, and it is the human part of the attack.

Step 2: Abuse ZIP path handling

The malicious input reaches the ZIP handling code where the path flaw sits. Because the user-supplied path is not properly validated before being used in file operations, the application acts on a path the attacker controls.

Why this matters: a ZIP file is not just a bag of bytes. It contains a list of entries, and each entry has a name. If the software takes that name at face value, the attacker can choose where files land. The advisory does not say which specific paths were used or which files were written.

Step 3: Execute code

An attacker can leverage this vulnerability to execute code in the context of the current process. The advisory does not describe the specific files written, the paths used, or the resulting behaviour beyond code execution in that context.

Why this is serious: the attacker can execute code in the context of the current process. The phrase "in the context of the current process" means the attacker's code inherits the permissions of the running program. If that program runs with high privileges, the attacker gets them too. The advisory does not state which privileges the current process runs with.

Root cause

The mistake is the lack of proper validation of a user-supplied path prior to using it in file operations, specifically in the handling of ZIP files. The advisory does not describe the code involved or which defence, if any, was present and failed.

In everyday terms, the software trusted input it should have checked. A path is just text, and text can say anything. The advisory does not describe what the update changed in the code.

Impact

A remote attacker can execute arbitrary code on affected installations of Schneider Electric EcoStructure Operator Terminal Expert, in the context of the current process. Exploitation requires user interaction: the target must visit a malicious page or open a malicious file. The advisory does not state which privileges the current process runs with, nor any other limiting condition.

For a beginner, the key points are: the attacker does not need physical access; the attacker does need the user to open something; and the consequences are under the attacker's control, because arbitrary code means whatever code they choose.

Fix

Schneider Electric issued an update to correct this vulnerability. The vendor's details are at:

Text
https://www.se.com/ww/en/download/document/SEVD-2020-133-04/

This block is a single web address. It points to the vendor's own security document for this issue. You would open it in a browser to read Schneider Electric's description and find the updated software.

Variants to test

The advisory gives no variant detail beyond the ZIP path handling flaw itself. Following from the described weakness, the things worth trying on similar targets are:

  1. Archive entries whose paths are not validated before file operations. A positive result is the application acting on an attacker-controlled path rather than confining it to the intended extraction location.
  2. The same untrusted-path pattern in other archive formats the product accepts. A positive result is the same behaviour outside ZIP handling.
  3. The delivery conditions named in the advisory: a malicious page or a malicious file that the user must open. A positive result is code execution in the context of the current process after that interaction.

Why these are listed: once you know a class of bug exists in one place, it is worth checking whether the same mistake appears elsewhere. Archive formats other than ZIP, such as tar or 7z, have the same concept of entry names and paths, so the same missing check can appear there. And the delivery condition is part of the bug's practicality: a flaw that needs a user to open a file is still a flaw, but the report has to show that interaction happening.

Hunting notes

The advisory names ZIP file handling as the location of the flaw and user interaction as the delivery condition. The precondition to keep in mind during triage is user interaction: a report needs the target to visit a malicious page or open a malicious file. The advisory does not describe the researcher's recon signals or how impact was demonstrated to the program beyond the code execution outcome it records.

For someone starting out, the lesson is to look at features that take a file from the user and do something with its contents. Unpacking archives is a classic example, because the archive itself carries names and paths that the software has to interpret. Triage means the first assessment of a report: is it real, is it in scope, and does it meet the conditions the program requires.

Disclosure timeline

  • 2020-01-30: Vulnerability reported to vendor
  • 2020-05-14: Coordinated public release of advisory

A coordinated disclosure means the researcher told the vendor first and gave them time to fix the issue before the details became public. The advisory was reported to the vendor on 2020-01-30 and released on 2020-05-14.

Glossary

  • Advisory: a public notice describing a vulnerability, usually published by the vendor or by the organisation that coordinated the report.
  • Arbitrary code execution: the ability for an attacker to run any instructions they choose on a machine, rather than being limited to a fixed behaviour.
  • Archive: a single file that contains other files inside it, often compressed, such as a ZIP.
  • Context of the current process: the permissions and identity under which the running program operates; code run in that context inherits them.
  • Coordinated disclosure: an arrangement where a researcher reports a flaw privately and the details are published after the vendor has had time to respond.
  • CVSS: Common Vulnerability Scoring System, a standard 0 to 10 scale for the severity of a vulnerability.
  • EcoStructure Operator Terminal Expert: the Schneider Electric software named as the affected product in the advisory.
  • Exploitation: the act of using a vulnerability to achieve an effect, such as running code.
  • File operations: actions software performs on files, such as opening, reading, writing or deleting them.
  • Path: text that identifies the location of a file or folder, for example folder/file.txt.
  • Path traversal: a flaw where a path supplied by an attacker is used without proper checking, allowing it to point outside the intended location.
  • Pwn2Own: a security contest in which researchers demonstrate vulnerabilities on real products.
  • Remote code execution: running attacker-controlled code on a machine over a network, without physical access.
  • Severity: a rating of how serious a vulnerability is, here high, based on its CVSS score.
  • Social engineering: tricking a person into taking an action, such as opening a file or visiting a page, that enables an attack.
  • Triage: the first assessment of a vulnerability report to decide whether it is valid and in scope.
  • User interaction: a step the victim must perform for an attack to work, such as opening a file or visiting a page.
  • User-supplied path: a path that comes from input the user provides or opens, rather than from the software itself.
  • Validation: checking input before using it, for example confirming a path stays inside the intended folder.
  • Vendor: the company that makes the affected product.
  • Zero Day Initiative: the organisation that published this advisory.
  • ZIP: a common archive file format that stores multiple files, each with a name and path, in one container.

More by Sharon Brizinov

View all

3 more disclosed reports, best first.

More from Zero Day Initiative

View all

The newest disclosed reports for this program.

Similar reports

View all

Same bug class and techniques, clearest first.

Path traversal and file inclusion

The lesson behind this report.

Input that builds a file path escapes the intended folder, reading or writing files the application should never touch.