cbcvebase.
CVE-2020-17518
published 2021-01-05

CVE-2020-17518: Apache Flink 1.5.1 introduced a REST handler that allows you to write an uploaded file to an arbitrary location on the local file system, through a maliciously…

PriorityP183high7.5CVSS 3.1
AVNACLPRNUINSUCNIHAN
ITWEXPLOITVulnCheck KEVInitial access
Exploited in the wild
EPSS
50.04%
98.8th percentile
Apache Flink 1.5.1 introduced a REST handler that allows you to write an uploaded file to an arbitrary location on the local file system, through a maliciously modified HTTP HEADER. The files can be written to any location accessible by Flink 1.5.1. All users should upgrade to Flink 1.11.3 or 1.12.0 if their Flink instance(s) are exposed. The issue was fixed in commit a5264a6f41524afe8ceadf1d8ddc8c80f323ebc4 from apache/flink:master.

Affected

3 ranges
VendorProductVersion rangeFixed in
apacheflink
apacheflink>= 1.5.1 < 1.11.31.11.3
apache_software_foundationapache_flink

Detection & IOCsextracted from sources · hover to see the quote

urlPOST /jars/upload HTTP/1.1
path/jars/upload
path/jobmanager/logs/..%252f..%252f..%252f..%252f..%252f..%252f..%252f..%252f..%252f..%252f..%252f..%252ftmp%252fpoc
filename../../../../../../../tmp/poc
hasha5264a6f41524afe8ceadf1d8ddc8c80f323ebc4
  • Detect path traversal upload attempts targeting the Apache Flink REST API: look for POST requests to /jars/upload containing a multipart Content-Disposition filename field with directory traversal sequences (e.g., '../' or URL-encoded variants).
  • Detect path traversal read attempts via the Flink log endpoint: look for GET requests to /jobmanager/logs/ containing double-URL-encoded traversal sequences (%252f).
  • The exploit uses a two-stage attack: (1) upload a file with a traversal path in the filename header to write to an arbitrary location, then (2) retrieve it via the log endpoint using double-percent-encoded traversal. Correlate POST /jars/upload followed by GET /jobmanager/logs/..%25 from the same source IP.
  • Nuclei template matcher: a successful exploit is confirmed when the response body of the second request (GET to traversal path) contains the random string uploaded in the POST body and returns HTTP 200.
  • ·Affected versions are Apache Flink 1.5.1 through 1.11.2; the vulnerability was introduced in 1.5.1. Only instances with the REST API exposed are exploitable.
  • ·Files can only be written to locations accessible by the Flink process user; privilege escalation beyond the Flink service account is not directly implied.

CVSS provenance

nvdv3.17.5HIGHCVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:H/A:N
nvdv2.05.0MEDIUMAV:N/AC:L/Au:N/C:N/I:P/A:N
vulncheck7.5HIGH
vendor_apache7.5HIGH
vendor_redhat7.5HIGH
CVEs like this are exactly what “Exploited This Week” covers.

Every Monday: what got weaponized or added to CISA KEV in the last seven days — each CVE cross-linked to its PoC, Nuclei template, and detection rule. Free, one email a week, unsubscribe in one click.