{"id":"CVE-2026-63335","aliases":["CVE-2026-63335","GHSA-qx7j-jv8m-fppr"],"related":[],"kind":"vulnerability","state":"published","title":"RabbitMQ Java client malformed body frame triggers raw command assembler exception","summary":"The RabbitMQ Java client library allows Java and JVM-based applications to connect to and interact with RabbitMQ nodes. Prior to 5.31.0, inbound AMQP command assembly in src/main/java/com/rabbitmq/client/impl/CommandAssembler.java processes a content-bearing method and header whose remainingBodyBytes value is smaller than a following AMQP.FRAME_BODY payload. CommandAssembler.consumeBodyFrame subtracts the peer-controlled payload length before validating that it fits, drives remainingBodyBytes negative, and throws a raw UnsupportedOperationException instead of MalformedFrameException. A malicious or compromised broker peer can send this malformed sequence on an open nonzero channel to terminate frame processing and close the client connection, causing denial of service for work using that connection. This issue is fixed in version 5.31.0.","summarySource":"cvelist","descriptions":[{"lang":"en","text":"The RabbitMQ Java client library allows Java and JVM-based applications to connect to and interact with RabbitMQ nodes. Prior to 5.31.0, inbound AMQP command assembly in src/main/java/com/rabbitmq/client/impl/CommandAssembler.java processes a content-bearing method and header whose remainingBodyBytes value is smaller than a following AMQP.FRAME_BODY payload. CommandAssembler.consumeBodyFrame subtracts the peer-controlled payload length before validating that it fits, drives remainingBodyBytes negative, and throws a raw UnsupportedOperationException instead of MalformedFrameException. A malicious or compromised broker peer can send this malformed sequence on an open nonzero channel to terminate frame processing and close the client connection, causing denial of service for work using that connection. This issue is fixed in version 5.31.0.","source":"cvelist"},{"lang":"en","text":"### Summary\nRabbitMQ Java Client's inbound AMQP command assembly accepts a content header declaring a small body and then processes a larger body frame by throwing a raw `UnsupportedOperationException` from `CommandAssembler`. A broker peer that the client has connected to can use this malformed frame sequence to fail frame processing and tear down the client connection instead of receiving a clean protocol-level malformed-frame error. \n\nThis was discovered based on an existing vulnerability CVE-2017-15699.\n\n### Details\nInbound frames enter the client through `SocketFrameHandler.readFrame`, which returns frames parsed from the peer-controlled input stream (`src/main/java/com/rabbitmq/client/impl/SocketFrameHandler.java:197`). `AMQConnection.MainLoop` reads each frame (`src/main/java/com/rabbitmq/client/impl/AMQConnection.java:692`) and dispatches non-zero-channel frames to the channel while the connection is open (`src/main/java/com/rabbitmq/client/impl/AMQConnection.java:748` and `src/main/java/com/rabbitmq/client/impl/AMQConnection.java:766`). The channel then passes the frame to the current command assembler through `AMQChannel.handleFrame` and `AMQCommand.handleFrame` (`src/main/java/com/rabbitmq/client/impl/AMQChannel.java:121`, `src/main/java/com/rabbitmq/client/impl/AMQCommand.java:114`). When a content-bearing method is followed by a content header, `CommandAssembler.consumeHeaderFrame` records the header's declared body size in `remainingBodyBytes` after only checking it against the configured maximum (`src/main/java/com/rabbitmq/client/impl/CommandAssembler.java:126` through `src/main/java/com/rabbitmq/client/impl/CommandAssembler.java:139`). The body-frame path subtracts the received payload length from that remaining count before validating that the payload fits (`src/main/java/com/rabbitmq/client/impl/CommandAssembler.java:145` through `src/main/java/com/rabbitmq/client/impl/CommandAssembler.java:149`), so a body frame larger than the declared size drives the count negative and reaches the raw `UnsupportedOperationException` at `src/main/java/com/rabbitmq/client/impl/CommandAssembler.java:150` and `src/main/java/com/rabbitmq/client/impl/CommandAssembler.java:151`. `AMQConnection` catches the resulting throwable in frame processing and performs connection failure handling and final shutdown (`src/main/java/com/rabbitmq/client/impl/AMQConnection.java:695` through `src/main/java/com/rabbitmq/client/impl/AMQConnection.java:705`).\n\n### PoC\n[poc.zip](https://github.com/user-attachments/files/28182717/poc.zip)\n\n```bash\nbash ./poc/run.sh\n```\n\n```text\nException in thread \"main\" java.lang.UnsupportedOperationException: %%%%%% FIXME unimplemented\n```\n\nThe `UnsupportedOperationException: %%%%%% FIXME unimplemented` fingerprint is the raw exception thrown at the negative `remainingBodyBytes` check in `CommandAssembler.consumeBodyFrame`. This line shows the malformed declared-size/body-size sequence reached the vulnerable assembler path.\n\n### Impact\nThe attacker model is a remote AMQP broker peer that the RabbitMQ Java Client application has accepted, including a malicious broker endpoint, a compromised broker, or routing that sends the client to an attacker-controlled peer. The peer needs a non-zero open channel that can receive a content-bearing server-to-client method such as `basic.deliver`, then sends the method frame, a content header declaring a body below the configured maximum, and a body frame whose payload exceeds that declared size. Under those conditions, the peer can force frame processing to fail with `UnsupportedOperationException` and close the AMQP connection, producing a client-side denial of service for work depending on that connection; the finding does not indicate memory corruption, data disclosure, or code execution.","format":"markdown","source":"ghsa"},{"lang":"es","text":"La biblioteca cliente Java de RabbitMQ permite que las aplicaciones Java y basadas en JVM se conecten e interactúen con los nodos de RabbitMQ. Antes de la versión 5.31.0, el ensamblaje de comandos AMQP entrantes en src/main/java/com/rabbitmq/client/impl/CommandAssembler.java procesa un método y una cabecera que contienen contenido, cuyo valor de remainingBodyBytes es menor que una carga útil AMQP.FRAME_BODY subsiguiente. CommandAssembler.consumeBodyFrame resta la longitud de la carga útil controlada por el par antes de validar que encaja, hace que remainingBodyBytes sea negativo y lanza una UnsupportedOperationException en bruto en lugar de una MalformedFrameException. Un par de broker malicioso o comprometido puede enviar esta secuencia malformada en un canal abierto no nulo para terminar el procesamiento de tramas y cerrar la conexión del cliente, causando denegación de servicio para el trabajo que utiliza esa conexión. Este problema está solucionado en la versión 5.31.0.","source":"nvd"}],"published":"2026-08-18T16:20:08.128Z","modified":"2026-10-22T22:10:00.250Z","severity":{"scorer":"GitHub_M","scheme":"CVSS:4.0","vector":"CVSS:4.0/AV:N/AC:L/AT:N/PR:L/UI:N/VC:N/VI:N/VA:N/SC:N/SI:N/SA:H","score":6.3,"rating":"MEDIUM"},"severities":[{"scorer":"GitHub_M","scheme":"CVSS:4.0","vector":"CVSS:4.0/AV:N/AC:L/AT:N/PR:L/UI:N/VC:N/VI:N/VA:N/SC:N/SI:N/SA:H","score":6.3,"rating":"MEDIUM"},{"scorer":"GitHub","scheme":"CVSS:4.0","vector":"CVSS:4.0/AV:N/AC:L/AT:N/PR:L/UI:N/VC:N/VI:N/VA:N/SC:N/SI:N/SA:H","rating":"MEDIUM"}],"cwes":["CWE-20"],"affected":[{"ranges":[{"version":"< 5.31.0","status":"affected"}],"vendor":"rabbitmq","product":"rabbitmq-java-client","source":"cvelist"},{"ranges":[{"type":"ecosystem","introduced":"0","status":"affected","fixed":"5.31.0"}],"ecosystem":"Maven","package":"com.rabbitmq:amqp-client","purl":"pkg:maven/com.rabbitmq/amqp-client","source":"ghsa"}],"references":[{"url":"https://github.com/rabbitmq/rabbitmq-java-client/security/advisories/GHSA-qx7j-jv8m-fppr","tags":["exploit","web","x-refsource-confirm"],"sources":["cvelist","ghsa","nvd"]},{"url":"https://github.com/rabbitmq/rabbitmq-java-client/pull/1959","tags":["web","x-refsource-misc"],"sources":["cvelist","ghsa","nvd"]},{"url":"https://github.com/rabbitmq/rabbitmq-java-client/pull/1960","tags":["web","x-refsource-misc"],"sources":["cvelist","ghsa","nvd"]},{"url":"https://github.com/rabbitmq/rabbitmq-java-client/commit/31735344d9f9dfc53740b67f06e560e8846b9322","tags":["web","x-refsource-misc"],"sources":["cvelist","ghsa","nvd"]},{"url":"https://github.com/rabbitmq/rabbitmq-java-client/commit/abd6d60d4e2bfc1a327dc90ab246b2e8aca1f33b","tags":["web","x-refsource-misc"],"sources":["cvelist","ghsa","nvd"]},{"url":"https://github.com/rabbitmq/rabbitmq-java-client/releases/tag/v5.31.0","tags":["web","x-refsource-misc"],"sources":["cvelist","ghsa","nvd"]},{"url":"https://github.com/rabbitmq/rabbitmq-java-client","tags":["package"],"sources":["ghsa"]}],"credits":[],"assigner":"GitHub_M","ssvc":{"scorer":"CISA-ADP","exploitation":"poc","automatable":"no","technicalImpact":"partial","date":"2026-08-18T17:43:20.756Z"},"sources":[{"source":"cvelist","name":"CVE List","id":"CVE-2026-63335","url":"https://www.cve.org/CVERecord?id=CVE-2026-63335","licence":"CVE Terms of Use","modified":"2026-08-18T17:43:31.624Z"},{"source":"ghsa","name":"GitHub Advisory Database","id":"GHSA-qx7j-jv8m-fppr","url":"https://github.com/advisories/GHSA-qx7j-jv8m-fppr","licence":"CC-BY-4.0","modified":"2026-09-10T03:50:54.002Z"},{"source":"nvd","name":"NVD","id":"CVE-2026-63335","url":"https://nvd.nist.gov/vuln/detail/CVE-2026-63335","licence":"Public domain","modified":"2026-10-22T22:10:00.250Z"}],"updatedAt":"2026-11-25T22:59:33.525Z","epss":{"score":0.00372,"percentile":0.33218,"date":"2026-12-01T12:00:22.000Z"}}