CWEweakness

CWE-474 Use of Function with Inconsistent Implementations

Official page ↗
Abstraction
Base
Structure
Simple
Status
Draft
Languages
C, Not Language-Specific, PHP
CWE version
5.0

Description

The code uses a function that has inconsistent implementations across operating systems and versions.

Extended description

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.

Common consequences

• Other: Quality Degradation, Varies by Context — 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.

Potential mitigations

• [Architecture and Design, Requirements] Do not accept inconsistent behavior from the API specifications when the deviant behavior increases the risk level.

Detection methods

• 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.)

Related

Child of · CWE (1)

  • CWE-758 Reliance on Undefined, Unspecified, or Implementation-Defined Behavior weakness

Referenced by CVE · weakness (14)

  • CVE-2026-50719 The Ingenic T41, and probably also T32, T40, and A1 SoC boot ROMs parse and execute an attacker-controlled init table from the SPL header… vulnerability
  • CVE-2026-39894 Cacti is an open source performance and fault management framework. vulnerability
  • CVE-2026-11097 Inappropriate implementation in WebView in Google Chrome on Android prior to 149.0.7827.53 allowed a remote attacker to leak cross-origin… vulnerability
  • CVE-2026-11102 Inappropriate implementation in Isolated Web Apps in Google Chrome prior to 149.0.7827.53 allowed a remote attacker to execute arbitrary… vulnerability
  • CVE-2026-25960 vLLM is an inference and serving engine for large language models (LLMs). vulnerability
  • CVE-2026-24010 Horilla is a free and open source Human Resource Management System (HRMS). vulnerability
  • CVE-2026-0902 Inappropriate implementation in V8 in Google Chrome prior to 144.0.7559.59 allowed a remote attacker to perform an out of bounds memory… vulnerability
  • CVE-2024-7001 Inappropriate implementation in HTML in Google Chrome prior to 127.0.6533.72 allowed a remote attacker who convinced a user to engage in… vulnerability
  • CVE-2024-5836 Inappropriate Implementation in DevTools in Google Chrome prior to 126.0.6478.54 allowed an attacker who convinced a user to install a… vulnerability
  • CVE-2024-5839 Inappropriate Implementation in Memory Allocator in Google Chrome prior to 126.0.6478.54 allowed a remote attacker to potentially exploit… vulnerability
  • CVE-2024-1694 Inappropriate implementation in Google Updator prior to 1.3.36.351 in Google Chrome allowed a local attacker to bypass discretionary access… vulnerability
  • CVE-2024-2628 Inappropriate implementation in Downloads in Google Chrome prior to 123.0.6312.58 allowed a remote attacker to perform UI spoofing via a… vulnerability
  • CVE-2024-1672 Inappropriate implementation in Content Security Policy in Google Chrome prior to 122.0.6261.57 allowed a remote attacker to bypass content… vulnerability
  • CVE-2021-0294 A vulnerability in Juniper Networks Junos OS, which only affects the release 18.4R2-S5, where a function is inconsistently implemented on… vulnerability

Referenced by CWE · child of (1)

  • CWE-589 Call to Non-ubiquitous API weakness