Description
The code uses deprecated or obsolete functions, which suggests that the code has not been actively reviewed or maintained.
As programming languages evolve, functions occasionally become obsolete due to: Functions that are removed are usually replaced by newer counterparts that perform the same task in some different and hopefully improved way.
Potential Impact
Other
Quality Degradation
Demonstrative Examples
...getpw(uid, pwdline);for (i=0; i<3; i++){cryptpw=strtok(pwdline, ":");pwdline=0;}result = strcmp(crypt(plainpw,cryptpw), cryptpw) == 0;...String cmd = null;...cmd = Environment.GetEnvironmentVariable("cmd");cmd = cmd.Trim();...String name = new String(nameBytes, highByte);...Mitigations & Prevention
Refer to the documentation for the obsolete function in order to determine why it is deprecated or obsolete and to learn about alternative ways to achieve the same functionality.
Consider seriously the security implications of using an obsolete function. Consider using alternate functions.
Detection Methods
- Automated Static Analysis - Binary or Bytecode High — According to SOAR [REF-1479], the following detection techniques may be useful:
- Manual Static Analysis - Binary or Bytecode SOAR Partial — According to SOAR [REF-1479], the following detection techniques may be useful:
- Dynamic Analysis with Manual Results Interpretation High — According to SOAR [REF-1479], the following detection techniques may be useful:
- Manual Static Analysis - Source Code High — According to SOAR [REF-1479], the following detection techniques may be useful:
- Automated Static Analysis - Source Code High — According to SOAR [REF-1479], the following detection techniques may be useful:
- Automated Static Analysis High — According to SOAR [REF-1479], the following detection techniques may be useful:
Related Weaknesses
Taxonomy Mappings
- 7 Pernicious Kingdoms: — Obsolete
- Software Fault Patterns: SFP3 — Use of an improper API
- SEI CERT Perl Coding Standard: DCL30-PL — Do not import deprecated modules
- SEI CERT Perl Coding Standard: EXP30-PL — Do not use deprecated or obsolete functions or modules
Frequently Asked Questions
What is CWE-477?
CWE-477 (Use of Obsolete Function) is a software weakness identified by MITRE's Common Weakness Enumeration. It is classified as a Base-level weakness. The code uses deprecated or obsolete functions, which suggests that the code has not been actively reviewed or maintained.
How can CWE-477 be exploited?
Attackers can exploit CWE-477 (Use of Obsolete Function) to quality degradation. This weakness is typically introduced during the Implementation phase of software development.
How do I prevent CWE-477?
Key mitigations include: Refer to the documentation for the obsolete function in order to determine why it is deprecated or obsolete and to learn about alternative ways to achieve the same functionality.
What is the severity of CWE-477?
CWE-477 is classified as a Base-level weakness (Medium abstraction). Its actual severity depends on the specific context and how the weakness manifests in your application.