漏洞分析 - Apache Flink 任意文件写入漏洞(CVE-2020-17518)
2021-01-12 19:01:17 Author: xz.aliyun.com(查看原文) 阅读量:254 收藏

简介 Apache Flink

参考官方文档 https://flink.apache.org/

Apache Flink® — Stateful Computations over Data Streams

Apache Flink是一个框架和分布式处理引擎,用于对无边界和有边界的数据流进行有状态的计算。

Flink被设计成可在所有常见的集群环境中运行,在任何规模下以"内存速度"执行计算。

REST API

参考官方文档 https://ci.apache.org/projects/flink/flink-docs-stable/ops/rest_api.html#jobmanager-logs

Flink 具有监控 API,可用于查询"正在运行的jobs" 和 "最近完成的jobs" 的状态和统计信息。该监控 API 被用于 Flink 自己的dashboard,同时也可用于自定义监控工具。

该监控 API 是 REST-ful API, 即接受 HTTP请求,并响应JSON格式的数据。

使用REST API

监控 API 中有一个API是 /jars/upload

作用是:
Uploads a jar to the cluster. The jar must be sent as multi-part data. Make sure that the "Content-Type" header is set to application/x-java-archive, as some http libraries do not add the header by default.

可使用curl上传jar文件
curl -X POST -H "Expect:" -F "jarfile=@path/to/flink-job.jar" http://hostname:port/jars/upload

漏洞信息

参考 : https://lists.apache.org/thread.html/rb43cd476419a48be89c1339b527a18116f23eec5b6df2b2acbfef261%40%3Cdev.flink.apache.org%3E

漏洞名称:
CVE-2020-17518: Apache Flink directory traversal attack: remote file writing through the REST API


文章来源: http://xz.aliyun.com/t/8995
如有侵权请联系:admin#unsafe.sh