A weakness where a system can be forced to consume excessive resources because it lacks controls on volume, rate, size, or complexity. It can arise from uncontrolled loops, oversized requests, expensive queries, or repeated retries, leading to degraded service or denial of service. Resource limits, throttling, and quotas are common defences.
What Makes CWE-400 Dangerous in Practice
CWE-400 describes a weakness in resource governance, not a single exploit technique. The danger is that input, requests, retries, or computation are allowed to scale faster than the system can safely absorb, so ordinary features become a denial-of-service path. The core issue is missing bounds on volume, size, rate, or complexity.
Because the failure mode is exhaustion, the same weakness can show up in many places: oversized payloads, expensive search or filter operations, recursive processing, repeated job submission, or a flood of otherwise valid requests. A system may look functionally correct while still being fragile under load if it does not enforce explicit limits early enough.
In practice, CWE-400 is often the umbrella weakness behind OWASP API Top 10 API4 Unrestricted Resource Consumption Guide, where API endpoints need quotas, throttling, and cost controls to stop a single client or workflow from consuming disproportionate capacity.
Common Failure Modes and Attack Surface
The most common failure pattern is letting an attacker or even a normal user trigger work that is cheap to request but expensive to process. That can mean deep object expansion, unbounded pagination, repeated retries, expensive database queries, cache-busting patterns, or algorithms whose cost rises sharply with input size or structure.
This weakness is especially harmful when the protected resource is shared: CPU, memory, thread pools, connection pools, queue depth, storage, or upstream service capacity. Once one layer is saturated, the impact can propagate to unrelated users and dependent services, turning a local inefficiency into a wider availability incident.
CWE-400 also overlaps with resource abuse patterns discussed in the CWE Top 25 Guide, where resource exhaustion is treated as a recurring root-cause weakness rather than a one-off bug class.
How Organisations Assess Exposure
Exposure assessment starts with identifying where untrusted input can influence work performed, not just where authentication happens. Teams should inventory public endpoints, internal batch jobs, background workers, file uploads, report generation, search functions, and any code path that can fan out into multiple downstream operations.
Then examine whether the implementation has explicit ceilings on request size, execution time, concurrency, recursion depth, pagination, retries, and per-tenant or per-client volume. The question is not whether limits exist somewhere in the stack, but whether the application itself enforces limits close to the expensive operation.
For software-root-cause context, the CVE, CWE and CPE Guide helps readers distinguish between the weakness class, the product instance, and any later vulnerability record that may reference it.
Defences, Detection, and Recovery
The most effective defences are explicit resource controls: bounded loops, input validation, pagination caps, query cost limits, timeouts, backpressure, quotas, and throttling. Good design also includes workload isolation so one tenant, job type, or API route cannot monopolise the same shared pool that other users depend on.
Detection should focus on early signs of exhaustion rather than only full outage conditions. Sudden spikes in latency, queue growth, retry storms, thread starvation, connection pool depletion, and repeated timeouts often indicate that a resource-control failure is developing before service collapse is visible to users.
For API-heavy systems, the OWASP API Top 10 API4 Unrestricted Resource Consumption Guide is especially useful because it ties the weakness to measurable controls such as request budgets, identity-aware quotas, and workload-specific cost checks.
Recovery after exploitation usually requires more than a restart. Teams may need to clear poisoned queues, reduce concurrency, disable expensive code paths, and review whether abuse was sustained long enough to create secondary failures in caches, autoscaling, or downstream services.
Risk and Threat Considerations
CWE-400 is dangerous because it lets an attacker or a noisy workload convert normal usage into service degradation without needing to break authentication or bypass authorization. The same weakness can be used for simple denial of service, for cost-amplification abuse, or for exhausting shared infrastructure that other users rely on.
Failure mechanism: The adversary or faulty client triggers operations whose cost is not bounded in proportion to the request, such as repeated retries, deep recursion, expensive queries, or oversized payload handling, until shared resources are depleted.
Impact: The result can be latency spikes, partial outages, cascading dependency failures, or full denial of service, with added operational cost when autoscaling or metered services are forced to absorb the load.
Standards & Framework Alignment
This section maps relevant standards and security frameworks to the operational risks and controls described in this guidance.
OWASP API Security Top 10 addresses the attack and risk surface, while NIST SP 800-53 Rev 5, CIS Controls v8 and NIST CSF 2.0 set the governance and control requirements practitioners need to meet.
| Framework | Control / Reference | Relevance |
|---|---|---|
| OWASP API Security Top 10 | API4 — Unrestricted Resource Consumption | CWE-400 is the underlying weakness behind unbounded API consumption. |
| Recommendation — Apply API4 controls to cap request cost, rate, and resource usage at the API boundary. | ||
| NIST SP 800-53 Rev 5 | SC-5 — Denial of Service Protection | CWE-400 directly concerns resisting resource exhaustion and service disruption. |
| SI-10 — Information Input Validation | Unchecked input size or complexity often drives the exhaustion condition in CWE-400. | |
| Recommendation — Implement SC-5 safeguards to limit resource consumption and resist denial-of-service conditions. Use SI-10 to validate and constrain input that could trigger excessive processing. | ||
| CIS Controls v8 | CIS-12 — Network Infrastructure Management | Resource exhaustion is mitigated by managing capacity, boundaries, and availability of exposed services. |
| Recommendation — Use CIS-12 to manage service capacity and reduce exposure to exhaustion-driven outages. | ||
| NIST CSF 2.0 | PR.PS-05 — Resilience to availability threats | CWE-400 threatens availability and requires resilience against exhaustion conditions. |
| Recommendation — Design services with PR.PS-05 so they remain available under load and abuse. | ||
Practitioner Guidance
What to watch for: Treat any user-controlled path that can expand into repeated or expensive work as a control point, not just a performance concern. The practical test is whether one request, one client, or one tenant can force disproportionate resource consumption.
Governance implication: Ownership should sit with the team that operates the expensive path, because the right fix is usually a combination of code-level limits, service-level policy, and monitoring thresholds. If the system has multiple tiers, make sure the limit is enforced where the cost is actually incurred.
Practitioner takeaway: If a feature can scale cost faster than it scales usefulness, it needs a hard boundary before production traffic finds it.
Related resources from NHI Mgmt Group
- When should teams use 400 instead of 422 for request failures?
- What do teams get wrong when they rely on top CWE rankings alone?
- Why do repeat CWE classes keep causing breaches even when teams know about them?
- How should security teams use the CWE Top 25 and OWASP Top 10 together without duplicating work?
Deepen Your Knowledge
Free weekly newsletter
Subscribe to the NHI & AI Identity Journal
The latest on NHI and Agentic AI security – articles, research, breaches, news and events every week.
Bonus 33% off our NHI Course when you subscribe.
Reviewed and updated by the NHIMG editorial team on November 25, 2026.
NHI Mgmt Group — the #1 independent authority on Non-Human Identity, IAM, and Agentic AI security. nhimg.org