The code uses a function that has inconsistent implementations across operating systems and versions.
View on MITREThe use of inconsistent implementations can cause changes in behavior when the code is ported or built under a different environment than the programmer expects, which can lead to security problems in some cases. The implementation of many functions varies by platform, and at times, even by different versions of the same platform. Implementation differences can include: Slight differences in the way parameters are interpreted leading to inconsistent results. Some implementations of the function carry significant security risks. The function might not be defined on all platforms. The function might change which return codes it can provide, or change the meaning of its return codes.
Do not accept inconsistent behavior from the API specifications when the deviant behavior increase the risk level.
No detection method information available for this CWE.
No examples or observed CVEs available for this CWE.
No relationship information available for this CWE.
CWE-474: Use of Function with Inconsistent Implementations is a Common Weakness Enumeration (CWE) entry maintained by MITRE. The code uses a function that has inconsistent implementations across operating systems and versions. The use of inconsistent implementations can cause changes in behavior when the code is ported or built under a different environment than the programmer expects, which can lead to security problems in some cases. The implementation of many functions varies by platform, and at times, even by different versions of the same platform. Implementation differences can include: Slight differences in the way parameters are interpreted leading to inconsistent results. Some implementations of the function carry significant security risks. The function might not be defined on all platforms. The function might change which return codes it can provide, or change the meaning of its return codes.
If exploited, CWE-474 (Use of Function with Inconsistent Implementations) it can compromise Other, leading to outcomes such as Quality Degradation and Varies by Context.
Recommended mitigations for CWE-474 include: Do not accept inconsistent behavior from the API specifications when the deviant behavior increase the risk level.
CWE-474 commonly affects C, PHP and Not Language-Specific. Note that weaknesses are often language-agnostic patterns, so secure coding practices apply broadly.
A CWE (Common Weakness Enumeration) like CWE-474 describes a category of software weakness — the underlying flaw type. A CVE (Common Vulnerabilities and Exposures) identifies a specific, real-world vulnerability in a particular product. In short, a CWE is the kind of mistake, and a CVE is an instance of that mistake being found in software.