Security weakness
CWE-400 Resource exhaustion (denial of service)
Your site lets one user consume unlimited memory, processing power or storage until it slows down or stops.
- Senior security engineers
- 540+ projects delivered
- Reply within one business day
Quick answer
What is CWE-400?
Uncontrolled Resource Consumption: The product does not properly control the allocation and maintenance of a limited resource.
Business impact
What CWE-400 could cost your business
MITRE documents what this weakness can do. Here is what that means for a website, store or app.
Availability
Downtime and lost sales
Crashes, slowdowns or exhausted resources can take your site, store or app offline.
- DoS: Crash, Exit, or Restart
- DoS: Resource Consumption (CPU)
- DoS: Resource Consumption (Memory)
Access Control
Accounts and admin areas exposed
Logins and permission checks can be bypassed, putting admin and customer accounts at risk.
- Bypass Protection Mechanism
- Other
In plain English
What Resource exhaustion (denial of service) means for your business
- 540+projects delivered
- 9+years in business
- 23+certified experts
A senior engineer replies within one business day.
Every server has finite memory, processing power, disk space, database connections and network capacity. This weakness means your application lets a request use as much of a resource as it asks for, with no ceiling. A single visitor, a faulty script or a deliberate attacker can then consume everything available, leaving nothing for your real customers.
The usual result is denial of service: pages time out, checkouts fail and the site goes offline until someone intervenes. On usage-billed cloud hosting or paid APIs, including AI services, it can also produce a large unexpected bill. It does not require a huge flood of traffic. One expensive request repeated a modest number of times is often enough if nothing limits it.
Where it shows up
- Search, filter and export endpoints that run heavy database queries or return unlimited rows because the page size parameter has no maximum.
- File and image upload forms with no size or dimension limits, where processing a very large or highly compressed file exhausts memory.
- Login, password reset, contact and coupon forms with no rate limiting, which can be submitted thousands of times by an automated script.
- Features that call paid third-party services, such as AI model APIs, SMS or email sending, without per-user quotas or spending caps.
Free security check
Is CWE-400 hiding in your site?
A senior engineer checks your site, store or app for this weakness and the rest of the CWE Top 25, then sends a prioritized fix plan within one business day. No obligation.
Official definition
How MITRE defines CWE-400
Uncontrolled Resource Consumption
The product does not properly control the allocation and maintenance of a limited resource.
Also known as: Resource Exhaustion
Fix it
How to fix Resource exhaustion (denial of service)
Practical steps in priority order. Share them with your developer or agency.
Add rate limiting and throttling
Limit requests per IP address, account and API key at the edge or gateway, with tighter limits on login, search and other expensive routes. Return HTTP 429 when a limit is exceeded.
Cap input and output sizes
Set maximum request body, upload, image dimension and JSON depth limits at the web server and application. Enforce a maximum page size on every list endpoint and require pagination.
Set timeouts and resource quotas
Apply timeouts to database queries, outbound calls and request handling. Use connection pool limits, container memory and CPU limits and per-user quotas so one workload cannot starve the rest.
Move heavy work off the request
Send exports, image processing, report generation and AI calls to a background queue with limited workers. Cache frequent results so repeated requests do not repeat the expensive work.
Monitor, alert and fail safely
Track CPU, memory, queue depth and third-party spend, with alerts and budget caps. When limits are hit, reject new work cleanly rather than crashing, and never skip security checks under load.
Signs you may be affected
- A small burst of requests to one page makes the whole site slow or unavailable.
- Your APIs accept any page size, file size or request body size.
- Hosting or third-party API bills spike without a matching rise in real customers.
Questions to ask your developer
- Which of our endpoints have rate limits, and what are they?
- What stops someone uploading a huge file or requesting a million records?
- Do we have spending caps on cloud and third-party API usage?
Prevention
What MITRE recommends, phase by phase
Every mitigation from the CWE entry, in the order a project runs: plan, build, test, operate.
- 01
Architecture and Design
- Design throttling mechanisms into the system architecture. The best protection is to limit the amount of resources that an unauthorized user can cause to be expended. A strong authentication and access control model will help prevent such attacks from occurring in the first place. The login application should be protected against DoS attacks as much as possible. Limiting the.
- 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.
- Ensure that protocols have specific limits of scale placed on them.
- 02
Implementation
- Ensure that all failures in resource allocation place the system into a safe posture.
Detection and evidence
How CWE-400 is found, and where it has hit
The testing methods MITRE recommends, and real vulnerabilities this weakness has caused.
How it is detected
- Automated Static AnalysisAutomated 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.
- Automated Dynamic AnalysisCertain 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.
- FuzzingWhile 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.
Real vulnerabilities it caused
- CVE-2019-19911Chain: Python library does not limit the resources used to process images that specify a very large number of bands (CWE-1284), leading to excessive memory consumption (CWE-789) or an integer overflow (CWE-190).
- CVE-2020-7218Go-based workload orchestrator does not limit resource usage with unauthenticated connections, allowing a DoS by flooding the service
- CVE-2020-3566Resource exhaustion in distributed OS because of "insufficient" IGMP queue management, as exploited in the wild per CISA KEV.
- CVE-2009-2874Product allows attackers to cause a crash via a large number of connections.
- CVE-2009-1928Malformed request triggers uncontrolled recursion, leading to stack exhaustion.
- CVE-2009-2858Chain: memory leak (CWE-404) leads to resource exhaustion.
How we fix it
From finding to fixed: how Codefreex closes CWE-400
- 01
Scan and confirm
We test your site, store or app for this weakness and the rest of the CWE Top 25 with automated scanning and manual review, and confirm what is actually exploitable.
- 02
Fix at the source
We change the code, configuration or dependency that causes it, not just the symptom, and plan the changes to avoid downtime.
- 03
Verify the fix
We retest every finding, check that nothing else broke and hand you a short report you can share with your team, client or auditor.
- 04
Keep it fixed
Updates, monitoring and maintenance so the weakness does not return with the next plugin, theme, app or code change.
Website SecurityPenetration TestingMalware Removal & Hack RepairWordPress Maintenance
FAQ
CWE-400: FAQs
Short answers for owners and developers. Not sure whether your site is affected? Ask us to check.
Is this the same as a DDoS attack?
They are related but different. A distributed denial of service attack overwhelms a site with traffic from many machines. Uncontrolled resource consumption is a flaw in your own application that lets a small number of requests use a disproportionate amount of resources. Fixing it makes your site far harder to knock offline and reduces what a traffic flood can achieve.
How serious is uncontrolled resource consumption for a business?
It directly affects availability and revenue. If your store or app is down or crawling, customers leave and orders are lost. With usage-based hosting or paid APIs, abuse can also create significant unplanned costs. In some systems, running out of resources can cause security controls to fail, so the impact is not always limited to downtime.
How do I protect my site against resource exhaustion?
Put limits on everything a request can ask for: rate, size, time and quantity. Add rate limiting at your CDN or API gateway, cap uploads and page sizes, set timeouts and move heavy tasks to background queues. Add monitoring and budget alerts so you find out about unusual consumption before your customers or your invoice tell you.
What is CWE-400?
CWE-400, “Uncontrolled Resource Consumption”, is a software weakness catalogued by MITRE in the Common Weakness Enumeration. The product does not properly control the allocation and maintenance of a limited resource.
How serious is CWE-400?
MITRE rates the likelihood of exploit as High. It can affect availability, access control, other, with impacts such as dos: crash, exit, or restart, dos: resource consumption (cpu), dos: resource consumption (memory). The real risk depends on where the weakness sits and what data or functions it exposes.
How do you prevent CWE-400?
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. 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.
Can Codefreex check my site for CWE-400?
Yes. A senior engineer reviews your site, store or app for CWE-400 and the rest of the CWE Top 25, confirms what is exploitable and sends a prioritized fix plan within one business day. Start with the free security check form on this page.
Free security check
Find out if CWE-400 affects your site
Send your URL. A senior engineer checks for this weakness and the rest of the CWE Top 25, and replies within one business day with what to fix first.
- A senior strategist reviews your request, not a sales bot
- Clear scope, timeline and estimate within one business day
- Free 30-minute discovery call, no obligation
- NDA available on request
- Emailhello@codefreex.com
- CallUSA +1 (209) 375-3475 · India +91 790 3375 530
- Prefer to talk?Book a 30-minute call
Weakness data from the Common Weakness Enumeration (CWE®) version 5.0, Copyright © 2006–2026, The MITRE Corporation. CWE is free to use by any organization or individual for any research, development, and/or commercial purposes under the CWE Terms of Use. CWE is a registered trademark of The MITRE Corporation. The business impact, risk profile and plain-English guidance on this page are written by Codefreex and are general information, not a security assessment of your system.