Advisory published

XYZ-2026-00031

amqplib: a malicious broker can stop the client with two unchecked sizes

Medium severityamqplibfixed in 2.3.0
the timeline of this fixnpm · amqplib · dates in UTC

Flagged 16 days before the advisory

CyberXYZ reads the changes made to a package's source code. We spotted this security fix on 8 Nov 2026. The maintainers' advisory (GHSA-37f9-7m79-6866) followed 16 days later.

16 daysfrom our flag to the advisory
  1. CyberXYZ flagged the fix
  2. Advisory published

What was wrong

amqplib trusted two numbers sent by the broker. It accepted a connection.tune with a frameMax below the protocol minimum of 4096, and the publish path then looped without advancing on any message of 2048 bytes or more. It also read the size field of each incoming frame without comparing it with any limit, so one frame header could make the client buffer and re-copy hundreds of megabytes.

Impactmedium

Denial of service. The client process runs out of memory or spends minutes of CPU copying buffers. Nothing is disclosed and no code runs.

Who is affected

Any Node.js process that uses amqplib 2.2.1 or earlier and connects to a broker that is malicious or compromised, or through a path where someone can answer as the broker.

What to do

Upgrade to amqplib 2.3.0. It rejects a frameMax below 4096 and adds a maxFrameSize option (default 64 MiB) that is checked from the frame header. If your broker sends unsplit frames larger than that, raise maxFrameSize or set it to 0.

npm install amqplib@2.3.0

Reported to the maintainers by @r-bedekar and fixed by the amqplib maintainers. Advisory: GHSA-37f9-7m79-6866.

XYZ-2026-00031.json · OSV
{
  "id": "XYZ-2026-00031",
  "summary": "amqplib: a malicious broker can stop the client with two unchecked sizes",
  "aliases": [
    "GHSA-37f9-7m79-6866"
  ],
  "affected": [
    {
      "package": {
        "ecosystem": "npm",
        "name": "amqplib"
      },
      "ranges": [
        {
          "type": "ECOSYSTEM",
          "events": [
            {
              "introduced": "0"
            },
            {
              "fixed": "2.3.0"
            }
          ]
        }
      ]
    }
  ],
  "references": [
    {
      "type": "FIX",
      "url": "https://github.com/amqp-node/amqplib/commit/2759ae8ab998ac83c18fa097f6e9a073cc61de4b"
    }
  ],
  "credits": [
    {
      "name": "CyberXYZ Security Threat Intel Team",
      "contact": [
        "https://cyberxyz.io"
      ],
      "type": "ANALYST"
    }
  ],
  "database_specific": {
    "cwe_ids": [
      "CWE-770"
    ]
  }
}

An excerpt of this record in the OSV format, for tools that read advisories. The full record as JSON.

The bug was found and fixed by the package's maintainers. CyberXYZ flagged the fix in the source and recorded the release that carries it. All CyberXYZ Advisories · The amqplib report


Think this record is wrong? Tell us; we respond within 2 business days.