Apache Qpid XML Document Type Definitions Processing
- Published: 12 Dec 2014
CVE-2014-3629
Share
Type
Severity
Affected products
CVE Reference
2014-10-31 | Reported to Apache and Red Hat |
2014-10-31 | Red Hat confirms reception |
2014-11-05 | Red Hat confirms the vulnerability and prepares fix |
2014-11-07 | Public fix released |
2014-12-12 | Advisory published |
A vulnerability was found in Apache Qpid which allows an attacker to force the server to parse an external Document Type Definition (DTD). This might allow an attacker to cause a Denial of Service (DoS) for applications using the message queue.
Apache Qpid is an open source message oriented middleware message broker. Qpid provides Java and C++ implementations of the Advanced Message Queuing Protocol (AMQP).
A vulnerability exists in the C++ broker implementation which allows an adversary to reference externally defined Document Type Definitions.
An attacker able to interact and send XML messages to a Qpid service endpoint could use this flaw to induce the service to perform HTTP requests. This can be used to perform server-side request forgery or DTD-based DoS attacks.
XML parsing as handled by Qpid does not restrict processing of externally defined XML Document Type Definitions.
The XML message exchange functionality can be disabled by removing the xml.so compiled binary module file from the Qpid modules directory.
Upgrade to Apache Qpid version 0.31 when made available by the vendor.
An adversary can trigger the processing of externally referenced Document Type Definitions when requesting a content based subscription to a message queue which holds XML formatted messages.
It is possible for a consumer dequeuing XML message(s) to specify an XQuery selector, thereby causing the broker to evaluate the XQuery expression in an attempt to match it against the messages in the queue while also performing XML Document Type Definition resolution.
Document Type Definition resolution occurs in the process of XML parsing and triggered in the following function implemented in XmlExchange.cpp:
bool XmlExchange::matches(Query& query, Deliverable& msg, bool parse_message_content) { std::string msgContent;
try {
…
boost::scoped_ptr
In order to successfully exploit this vulnerability, an attacker has to act on behalf of both a publisher and a consumer. The following is an attack pattern which will result in triggering the DTD resolution process:
The exploitation and impact of this vulnerability depend on the underlying XML parser. Apache Qpid supports the Xerces and FastXDM parsers, with Xerces being used by default. It was confirmed that a default setup of Apache Qpid with Xerces is vulnerable to server-side request forgery.