The product does not properly check when a function or operation returns a value that is legitimate for the function, but is not expected by the product.

Primary

Resultant

Implementation

Integrity
Other
Unexpected State
Alter Execution Logic

Automated Static Analysis
Automated static analysis, commonly referred to as Static Application Security Testing (SAST), can find some instances of this weakness by analyzing source code (or binary/compiled code) without having to execute it. Typically, this is done by building a model of data flow and control flow, then searching for potentially-vulnerable patterns that connect "sources" (origins of input) with "sinks" (destinations where the data interacts with external components, a lower layer such as the OS, etc.)
High

CVE-2004-1395
Certain packets (zero byte and other lengths) cause a recvfrom call to produce an unexpected return code that causes a server's listening loop to exit.
https://www.cve.org/CVERecord?id=CVE-2004-1395

CVE-2002-2124
Unchecked return code from recv() leads to infinite loop.
https://www.cve.org/CVERecord?id=CVE-2002-2124

CVE-2005-2553
Kernel function does not properly handle when a null is returned by a function call, causing it to call another function that it shouldn't.
https://www.cve.org/CVERecord?id=CVE-2005-2553

CVE-2005-1858
Memory not properly cleared when read() function call returns fewer bytes than expected.
https://www.cve.org/CVERecord?id=CVE-2005-1858

CVE-2000-0536
Bypass access restrictions when connecting from IP whose DNS reverse lookup does not return a hostname.
https://www.cve.org/CVERecord?id=CVE-2000-0536

CVE-2001-0910
Bypass access restrictions when connecting from IP whose DNS reverse lookup does not return a hostname.
https://www.cve.org/CVERecord?id=CVE-2001-0910

CVE-2004-2371
Game server doesn't check return values for functions that handle text strings and associated size values.
https://www.cve.org/CVERecord?id=CVE-2004-2371

CVE-2005-1267
Resultant infinite loop when function call returns -1 value.
https://www.cve.org/CVERecord?id=CVE-2005-1267

Unexpected Status Code or Return Value

SFP4
Unchecked Status Condition

EXP00-PL
Do not return undef
Imprecise

Allowed
This CWE entry is at the Base level of abstraction, which is a preferred level of abstraction for mapping to the root causes of vulnerabilities.
Carefully read both the name and description to ensure that this mapping is an appropriate fit. Do not try to 'force' a mapping to a lower-level Base/Variant simply to comply with this preferred level of abstraction.

Usually primary, but can be resultant from issues such as behavioral change or API abuse. This can produce resultant vulnerabilities.

PLOVER
2006-07-19
Draft 3
2006-07-19

Eric Dalci
Cigital
2008-07-01
updated Time_of_Introduction

CWE Content Team
MITRE
2008-09-08
updated Relationships, Other_Notes, Taxonomy_Mappings

CWE Content Team
MITRE
2009-03-10
updated Relationships

CWE Content Team
MITRE
2009-12-28
updated Other_Notes, Relationship_Notes

CWE Content Team
MITRE
2011-06-01
updated Common_Consequences

CWE Content Team
MITRE
2011-06-27
updated Common_Consequences

CWE Content Team
MITRE
2012-05-11
updated Relationships

CWE Content Team
MITRE
2014-07-30
updated Relationships, Taxonomy_Mappings

CWE Content Team
MITRE
2017-11-08
updated Applicable_Platforms, Taxonomy_Mappings

CWE Content Team
MITRE
2019-01-03
updated Taxonomy_Mappings

CWE Content Team
MITRE
2020-08-20
updated Relationships

CWE Content Team
MITRE
2021-03-15
updated Relationships

CWE Content Team
MITRE
2023-01-31
updated Description

CWE Content Team
MITRE
2023-04-27
updated Relationships, Time_of_Introduction

CWE Content Team
MITRE
2023-06-29
updated Mapping_Notes

CWE Content Team
MITRE
2025-12-11
4.19
2025-12-11
updated Detection_Factors, Relationships, Weakness_Ordinalities