Goal Reached Thanks to every supporter — we hit 100%!

Goal: 1000 CNY · Raised: 1000 CNY

100.0%

CWE-408 (不正确的行为次序:早期放大攻击) — Vulnerability Class 5

5 vulnerabilities classified as CWE-408 (不正确的行为次序:早期放大攻击). AI Chinese analysis included.

CWE-408 represents a logic flaw where a system executes resource-intensive operations prior to verifying user identity or permissions. This weakness is typically exploited by attackers who trigger these expensive processes, such as complex database queries or file uploads, using unauthenticated requests. By doing so, they aim to exhaust server resources, leading to denial-of-service conditions or significant performance degradation for legitimate users. Developers can prevent this vulnerability by strictly enforcing authentication and authorization checks before initiating any costly computational tasks. Implementing a secure middleware layer that validates credentials early in the request lifecycle ensures that only authorized entities can access expensive functionalities. Additionally, rate limiting and input validation should be applied at the earliest possible stage to mitigate the impact of malicious requests, thereby preserving system stability and ensuring fair resource allocation.

MITRE CWE Description
The product allows an entity to perform a legitimate but expensive operation before authentication or authorization has taken place.
Common Consequences (1)
AvailabilityDoS: Amplification, DoS: Crash, Exit, or Restart, DoS: Resource Consumption (CPU), DoS: Resource Consumption (Memory)
System resources, CPU and memory, can be quickly consumed. This can lead to poor system performance or system crash.
Examples (1)
This function prints the contents of a specified file requested by a user.
function printFile($username,$filename){ //read file into string $file = file_get_contents($filename); if ($file && isOwnerOf($username,$filename)){ echo $file; return true; } else{ echo 'You are not authorized to view this file'; } return false; }
Bad · PHP

Vulnerabilities classified as CWE-408 (不正确的行为次序:早期放大攻击) represent 5 CVEs. The CWE taxonomy describes the weakness; review individual CVEs for product-specific impact.