News

PoC exploits for Apache Flink Path Traversal vulnerabilities posted

This week, the Apache Flink project has disclosed two severe Path Traversal vulnerabilities in the framework that can allow attackers to both upload and retrieve arbitrary files on a vulnerable system.

Apache Flink is an open-source unified stream-processing and batch-processing framework written in Java and Scala.

Within hours of disclosure of these vulnerabilities on NVD, hackers and pentesters posted PoC exploits that can be used against vulnerable Apache Flink instances.

CVE-2020-17518: Arbitrary file upload via Path Traversal

The CVE concerns a REST handler which was introduced in Apache Flink 1.5.1 and enables file uploads to arbitrary locations on the file system of a vulnerable server.

Attackers can, for example, POST an arbitrary file along with its intended destination location to /jars/upload endpoint via an HTTP request by a crafted HTTP header shown below in an example:

Content-Disposition: form-data; name="jarfile"; filename="../../../../../../tmp/success"

On successful exploitation, the attacker’s file will be uploaded to the target directory and can lead to consequences, such as overwriting existing files and achieving remote code execution.

Vulhub has posted a PoC exploit for CVE-2020-17518 that security teams can use to test their vulnerable instances.

PoC demo for CVE-2020-17518 (Source: Vulhub)

The fix made by the project, as observed by Security Report and shown below, resolves the destination path of an uploaded file in a manner that prevents Path Traversal.

Fix for arbitrary file upload vulnerability (CVE-2020-17518)

CVE-2020-17519: Arbitrary file read via Path Traversal

This vulnerability was introduced in Apache Flink versions 1.11.0 and above. It allows attackers to read arbitrary files and directories on a vulnerable system.

This CVE has a much simpler exploit payload as demonstrated by a PoC posted on GitHub.

The example Path Traversal payload for CVE-2020-17519 shown below attempts to retrieve the sensitive /etc/passwd file from a vulnerable server.

The fix made by the Apache Flink project as observed by Security Report and shown below resolves the file read vulnerability by removing direct access to a file path provided via the request handler.

Fix made for CVE-2020-17519

Both vulnerabilities have been patched in versions 1.11.3 and above.

Flink users are advised to upgrade to fixed versions 1.11.3 or 1.12.0 of Flink, should their instances be exposed.

H/t to Jas502n and Jin Wook Kim for bringing these PoCs to light.

Ax Sharma

Ax Sharma is an Indian-origin British security researcher, journalist and TV subject matter expert with a focus on malware analysis and cybercrime investigations. His areas of interest include open source software security, threat intel analysis, and reverse engineering. Frequently featured by leading media outlets like the BBC, Channel 5, Fortune, WIRED, The Register, among others, Ax is an active community member of the OWASP Foundation and the British Association of Journalists (BAJ).

Recent Posts

Sea Turtle Cyber Espionage Campaign Targets Telecommunication and IT Companies in the Netherlands

Telecommunication, media, internet service providers (ISPs), information technology (IT)-service providers, and Kurdish websites in the…

10 months ago

Rogue WordPress plugin: Threat hunters uncover credit card skimming campaign targeting e-commerce sites

Rogue WordPress Plugin Found to Steal Credit Card Information in Magecart Campaign Threat hunters have…

11 months ago

Albanian Parliament and telco ‘One Albania’ suffer cyber attacks

The Assembly of the Republic of Albania and telecom company One Albania have recently fallen…

11 months ago

Carbanak Banking Malware Resurfaces with Updated Tactics in Ransomware Attacks

The banking malware Carbanak has resurfaced with updated tactics, incorporating attack vendors and techniques to…

11 months ago

Theme park giant Parques Reunidos hit by a ransomware cyber attack

One of the world's largest theme park operators, Parques Reunidos has disclosed a cybersecurity incident.…

2 years ago

Phishing kit screenshots your email domain on the fly to appear real

Phishing kit used by multiple hacked sites generates a log in page on the fly…

2 years ago

This website uses cookies.