CWEweakness
CWE-1177 Use of Prohibited Code
- Abstraction
- Class
- Structure
- Simple
- Status
- Incomplete
- Languages
- Not Language-Specific
- CWE version
- 5.0
Description
The product uses a function, library, or third party component
that has been explicitly prohibited, whether by the developer or
the customer.
Common consequences
• Other: Reduce Maintainability — This issue can also make the product more costly and difficult to maintain.
Potential mitigations
• [Build and Compilation, Implementation] Identify a list of prohibited API functions and prohibit developers from using these functions, providing safer alternatives. In some cases, automatic code analysis tools or the compiler can be instructed to spot use of prohibited functions, such as the "banned.h" include file from Microsoft's SDL. [REF-554] [REF-1009] [REF-7]
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.)
Observed examples
• CVE-2007-1470: Library has multiple buffer overflows using sprintf() and strcpy()
• CVE-2007-4004: FTP client uses inherently insecure gets() function and is setuid root on some systems, allowing buffer overflow
Related
Observed example · CVE (2)
- CVE-2007-4004 Buffer overflow in the ftp client in IBM AIX 5.3 SP6 and 5.2.0 allows local users to execute arbitrary code via unspecified vectors that… vulnerability
- CVE-2007-1470 Multiple buffer overflows in LIBFtp 5.0 allow user-assisted remote attackers to execute arbitrary code via certain long arguments to the… vulnerability
Child of · CWE (1)
- CWE-710 Improper Adherence to Coding Standards weakness