I've recently found vulnerability in Milton Webdav 2.7.0.1 (project page - http://milton.io/). Milton Webdav is a Java library for adding webdav capabilities to your applications.
Milton Webdav supports PROPFIND, PROPPATCH and LOCK methods. This Webdav methods expect XML in request body. Java classes io.milton.http.webdav.
Here is the code snippet from io.milton.http.webdav.
..
@Override
public PropertiesRequest getRequestedFields( InputStream in ) {
final Set<QName> set = new LinkedHashSet<QName>();
try {
ByteArrayOutputStream bout = new ByteArrayOutputStream();
StreamUtils.readTo( in, bout, false, true );
byte[] arr = bout.toByteArray();
if( arr.length > 1 ) {
ByteArrayInputStream bin = new ByteArrayInputStream( arr );
XMLReader reader = XMLReaderFactory.
reader.setFeature("http://xml.
..
This code prohibits declaration of external parameter entities. At the same time general external entities and external DTDs are allowed.
Attacker can exploit this issue by adding DOCTYPE declaration to XML body of PROPFIND, PROPPATCH and LOCK methods that references external DTD or have general external entity declaration. Vulnerability allows attacker to read local files (list directory content), perform SSRF and DoS attacks. Exploit for CVE-2015-1833 written by me (https://www.exploit-db.com/
Now vulnerability is patched. See commits b5851c1 and b41072b herehttps://github.com/miltonio/
Komentarų nėra:
Rašyti komentarą