CVE-2026-12666 Overview
CVE-2026-12666 is an XML External Entity (XXE) injection vulnerability in IBM MQ Classes for Java. The flaw resides in MQRFH2 header processing and affects multiple long-term support (LTS) and continuous delivery (CD) releases across IBM MQ 9.1, 9.2, 9.3, 9.4, and 10.0. An authenticated attacker with network access can supply crafted XML content in an MQRFH2 header to disclose sensitive information or trigger a denial of service. The weakness is tracked under CWE-611: Improper Restriction of XML External Entity Reference.
Critical Impact
Authenticated attackers can read sensitive files from the broker host or crash message processing by injecting malicious XML entities into MQRFH2 headers.
Affected Products
- IBM MQ 9.1.0.0 through 9.1.0.37 LTS and 9.2.0.0 through 9.2.0.43 LTS Classes for Java
- IBM MQ 9.3.0.0 through 9.3.0.41 LTS, 9.3.0.0 through 9.3.5.1 CD, 9.4.0.0 through 9.4.0.25 LTS, and 9.4.0.0 through 9.4.5.1 CD Classes for Java
- IBM MQ 10.0.0.0 Classes for Java
Discovery Timeline
- 2026-09-15 - CVE-2026-12666 published to the National Vulnerability Database
- 2026-09-17 - CVE-2026-12666 last updated in NVD
Technical Details for CVE-2026-12666
Vulnerability Analysis
IBM MQ Classes for Java processes MQRFH2 (Rules and Formatting Header 2) headers to carry XML-formatted properties alongside message payloads. The parser used for these headers resolves external entity references without adequate restrictions. An authenticated client that can submit a message to a queue can embed a malicious document type definition (DTD) in the MQRFH2 header. When the broker or a consuming Java application parses the header, the XML processor dereferences the external entities.
Exploitation yields two primary outcomes. First, the parser can be coerced to read local files or issue outbound requests to attacker-controlled URIs, exposing configuration data, credentials, or internal network resources. Second, entity expansion or recursive references can exhaust memory and CPU, halting message processing. The network attack vector combined with low required privileges makes this reachable from any authenticated MQ producer.
Root Cause
The root cause is an insecurely configured XML parser inside the MQRFH2 header handling code path. The parser leaves external general entity and parameter entity resolution enabled and does not disable DTD processing, matching the pattern described by CWE-611.
Attack Vector
An attacker with valid MQ credentials connects to a queue manager and publishes a message with an MQRFH2 header containing a crafted DTD. The DTD declares an external entity that references a local file (for example file:///etc/passwd) or a remote URI. When the header is parsed, the resolved entity is either returned in an error message, exfiltrated via an out-of-band channel, or triggers resource exhaustion. No user interaction is required.
The vulnerability is described in prose because no verified proof-of-concept has been published. Refer to the IBM Support Page for vendor-supplied technical details.
Detection Methods for CVE-2026-12666
Indicators of Compromise
- MQ messages containing MQRFH2 headers with <!DOCTYPE> declarations or <!ENTITY> definitions referencing external URIs.
- Outbound network connections from queue manager or Java client hosts to unfamiliar external IP addresses immediately after message consumption.
- Java process crashes, OutOfMemoryError events, or sustained high CPU on amqzlaa0 and related MQ processes.
Detection Strategies
- Enable MQ channel authentication and message tracing to capture full MQRFH2 header content for inspection.
- Deploy inline content inspection at MQ gateways to flag XML payloads containing external entity declarations.
- Correlate authentication events on the queue manager with anomalous outbound DNS or HTTP requests from the broker host.
Monitoring Recommendations
- Ingest MQ error logs (AMQERR01.LOG) and Java application logs into a central SIEM and alert on XML parsing exceptions.
- Monitor queue depth spikes and consumer thread stalls that may indicate entity expansion denial of service.
- Track file access events on queue manager hosts targeting sensitive paths such as /etc/, credential stores, and TLS keystores.
How to Mitigate CVE-2026-12666
Immediate Actions Required
- Apply the IBM-provided fix listed on the IBM Support Page to all affected MQ Classes for Java installations.
- Inventory Java applications that link against com.ibm.mq.jar or com.ibm.mqjms.jar and confirm the shipped library versions.
- Restrict MQ authenticated access to trusted producers and revoke credentials for accounts that do not require publish rights.
Patch Information
IBM has published remediation guidance and fix availability on the IBM Support Page for CVE-2026-12666. Upgrade IBM MQ 9.1, 9.2, 9.3, 9.4, and 10.0 Classes for Java to the fixed maintenance level indicated by IBM for each release train.
Workarounds
- Configure downstream Java consumers to use a hardened DocumentBuilderFactory with FEATURE_SECURE_PROCESSING enabled and DTDs disabled where custom parsing of MQRFH2 occurs.
- Enforce channel authentication records (SET CHLAUTH) and TLS mutual authentication to limit which principals may place messages on queues.
- Segment MQ broker hosts from sensitive internal networks to reduce the value of file read and server-side request forgery primitives.
# Hardening example: disable DTD processing in a Java XML parser consuming MQRFH2 content
# DocumentBuilderFactory dbf = DocumentBuilderFactory.newInstance();
# dbf.setFeature("http://apache.org/xml/features/disallow-doctype-decl", true);
# dbf.setFeature("http://xml.org/sax/features/external-general-entities", false);
# dbf.setFeature("http://xml.org/sax/features/external-parameter-entities", false);
# dbf.setFeature("http://apache.org/xml/features/nonvalidating/load-external-dtd", false);
# dbf.setXIncludeAware(false);
# dbf.setExpandEntityReferences(false);
Disclaimer: This content was generated using AI. While we strive for accuracy, please verify critical information with official sources.

