Xml Arbitrary File Read vulnerability and Remedy

Source: Internet
Author: User

 

I circled a forum in a black broad forum and found the xml read Arbitrary File Vulnerability.
As a result, I suddenly think of the xmlgetshell of dz, which is a little dangerous. So I will release it here.
With php + xml, any file can be read as long as you have the permission,

Simple_xml_string, xml_parse, and DOMDocument are used in different ways.

According to the prompts on the official php website, the first is to use libxml

The two also use libxml

The third one uses expat.

Libxml supports parsing external files, but expat does not parse external files.

So this makes expat safer when processing xml, so it is safer to replace simple_xml_string with xml_parse.

From network security technology blog (http://www.0day.la)

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.