---
title: "CWE-477: Use of Obsolete Function"
url: https://radicalnotion.ai/cwe/cwe-477
type: cwe
description: "The code uses deprecated or obsolete functions, which suggests that the code has not been actively reviewed or maintained."
updated: 2026-11-10
source: RadicalNotion.AI
license: CC BY-NC 4.0 (https://creativecommons.org/licenses/by-nc/4.0/)
---

# CWE-477: Use of Obsolete Function

- **Abstraction:** Base
- **Structure:** Simple
- **Status:** Draft
- **CVEs with this as primary weakness:** 16
- **Of those, in CISA KEV:** 0
- **New in 2026:** 0
- **CWE catalog version:** 4.21

## 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:

Advances in the language

Improved understanding of how operations should be performed effectively and securely

Changes in the conventions that govern certain operations

Functions that are removed are usually replaced by newer counterparts that perform the same task in some different and hopefully improved way.

## Modes of introduction

| Phase | Note |
| --- | --- |
| Implementation | - |

## Common consequences

| Scope | Impact | Note |
| --- | --- | --- |
| Other | Quality Degradation | - |

## Potential mitigations

### Implementation

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.

### Requirements

Consider seriously the security implications of using an obsolete function. Consider using alternate functions.

## Detection methods

### Automated Static Analysis - Binary or Bytecode

According to SOAR \[REF-1479\], the following detection techniques may be useful:

Highly cost effective:

Cost effective for partial coverage:

- Binary / Bytecode Quality Analysis
- Bytecode Weakness Analysis - including disassembler + source code weakness analysis

Effectiveness: High

### Manual Static Analysis - Binary or Bytecode

According to SOAR \[REF-1479\], the following detection techniques may be useful:

Cost effective for partial coverage:

- Binary / Bytecode disassembler - then use manual analysis for vulnerabilities & anomalies

Effectiveness: SOAR Partial

### Dynamic Analysis with Manual Results Interpretation

According to SOAR \[REF-1479\], the following detection techniques may be useful:

Highly cost effective:

- Debugger

Effectiveness: High

### Manual Static Analysis - Source Code

According to SOAR \[REF-1479\], the following detection techniques may be useful:

Highly cost effective:

Cost effective for partial coverage:

- Manual Source Code Review (not inspections)
- Focused Manual Spotcheck - Focused manual analysis of source

Effectiveness: High

### Automated Static Analysis - Source Code

According to SOAR \[REF-1479\], the following detection techniques may be useful:

Highly cost effective:

- Source Code Quality Analyzer
- Source code Weakness Analyzer
- Context-configured Source Code Weakness Analyzer

Effectiveness: High

### Automated Static Analysis

According to SOAR \[REF-1479\], the following detection techniques may be useful:

Highly cost effective:

- Origin Analysis

Effectiveness: High

### Architecture or Design Review

According to SOAR \[REF-1479\], the following detection techniques may be useful:

Highly cost effective:

- Formal Methods / Correct-By-Construction
- Inspection (IEEE 1028 standard) (can apply to requirements, design, source code, etc.)

Effectiveness: High

## Demonstrative examples

### Example 1

The following code uses the deprecated function getpw() to verify that a plaintext password matches a user's encrypted password. If the password is valid, the function sets result to 1; otherwise it is set to 0.

Bad code:

```c
...
getpw(uid, pwdline);
for (i=0; i<3; i++){
    cryptpw=strtok(pwdline, ":");
    pwdline=0;
}
result = strcmp(crypt(plainpw,cryptpw), cryptpw) == 0;
...
```

Although the code often behaves correctly, using the getpw() function can be problematic from a security standpoint, because it can overflow the buffer passed to its second parameter. Because of this vulnerability, getpw() has been supplanted by getpwuid(), which performs the same lookup as getpw() but returns a pointer to a statically-allocated structure to mitigate the risk. Not all functions are deprecated or replaced because they pose a security risk. However, the presence of an obsolete function often indicates that the surrounding code has been neglected and may be in a state of disrepair. Software security has not been a priority, or even a consideration, for very long. If the program uses deprecated or obsolete functions, it raises the probability that there are security problems lurking nearby.

### Example 2

In the following code, the programmer assumes that the system always has a property named "cmd" defined. If an attacker can control the program's environment so that "cmd" is not defined, the program throws a null pointer exception when it attempts to call the "Trim()" method.

Bad code:

```java
String cmd = null;
...
cmd = Environment.GetEnvironmentVariable("cmd");
cmd = cmd.Trim();
```

### Example 3

The following code constructs a string object from an array of bytes and a value that specifies the top 8 bits of each 16-bit Unicode character.

Bad code:

```java
...
String name = new String(nameBytes, highByte);
...
```

In this example, the constructor may not correctly convert bytes to characters depending upon which charset is used to encode the string represented by nameBytes. Due to the evolution of the charsets used to encode strings, this constructor was deprecated and replaced by a constructor that accepts as one of its parameters the name of the charset used to encode the bytes for conversion.

## Real CVEs with this weakness (sample of 12 of 16)

| CVE | Title | Severity | CVSS | EPSS | CISA KEV | Published |
| --- | --- | --- | --- | --- | --- | --- |
| CVE-2025-49217 | Trend Micro Endpoint Encryption ValidateToken Deserialization of Untrusted Data Remote Code Execution Vulnerability | critical | 9.8 | - | No | 2025-06-17 |
| CVE-2025-49216 | Trend Micro Endpoint Encryption DbAppDomain Authentication Bypass Vulnerability | critical | 9.8 | - | No | 2025-06-17 |
| CVE-2025-49213 | Trend Micro Endpoint Encryption PolicyServerWindowsService Deserialization of Untrusted Data Remote Code Execution Vulnerability | critical | 9.8 | - | No | 2025-06-17 |
| CVE-2025-49212 | Trend Micro Endpoint Encryption DeserializeFromBase64String Deserialization of Untrusted Data Remote Code Execution Vulnerability | critical | 9.8 | - | No | 2025-06-17 |
| CVE-2025-49220 | Trend Micro Apex Central ConvertFromJson Deserialization of Untrusted Data Remote Code Execution Vulnerability | critical | 9.8 | - | No | 2025-06-17 |
| CVE-2025-49219 | Trend Micro Apex Central GetReportDetailView Deserialization of Untrusted Data Remote Code Execution Vulnerability | critical | 9.8 | - | No | 2025-06-17 |
| CVE-2023-23451 | - | critical | 9.8 | - | No | 2023-04-19 |
| CVE-2018-17890 | Use of Obsolete Function in NUUO CMS | critical | 9.8 | - | No | 2018-10-12 |
| CVE-2025-49214 | Deserialization of Untrusted Data RCE | high | 8.8 | - | No | 2025-06-17 |
| CVE-2023-28829 | Use of Obsolete Function Vulnerability in SIMATIC WinCC before V8 | high | 8.8 | - | No | 2023-06-13 |
| CVE-2022-1384 | Authorized users are allowed to install old plugin versions from the Marketplace | high | 8.8 | - | No | 2022-04-19 |
| CVE-2019-18251 | OMRON CX-Supervisor Vulnerable Third-Party Component Remote Code Execution Vulnerability | high | 8.8 | - | No | 2019-11-25 |

## Related weaknesses

| Relationship | CWE | Name |
| --- | --- | --- |
| Parent | [CWE-710](https://radicalnotion.ai/cwe/cwe-710) | Improper Adherence to Coding Standards |

## Taxonomy mappings

| Taxonomy | Entry | Id | Fit |
| --- | --- | --- | --- |
| 7 Pernicious Kingdoms | Obsolete | - | - |
| Software Fault Patterns | Use of an improper API | SFP3 | - |
| SEI CERT Perl Coding Standard | Do not import deprecated modules | DCL30-PL | CWE More Specific |
| SEI CERT Perl Coding Standard | Do not use deprecated or obsolete functions or modules | EXP30-PL | CWE More Specific |

## Frequently asked questions

### What is CWE-477?

The code uses deprecated or obsolete functions, which suggests that the code has not been actively reviewed or maintained.

### What CVEs are caused by CWE-477?

16 recorded CVEs are attributed to CWE-477, including CVE-2025-49217, CVE-2025-49216 and CVE-2025-49213.

### How do you prevent CWE-477?

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.

### How is CWE-477 detected?

Automated Static Analysis - Binary or Bytecode: According to SOAR, the following detection techniques may be useful:

### What are the consequences of CWE-477?

Exploiting CWE-477 can lead to: Quality Degradation.

### Is CWE-477 actively exploited?

16 recorded CVEs are caused by CWE-477; none are currently in CISA's KEV catalog of actively exploited flaws.

Primary source: [MITRE CWE](https://cwe.mitre.org/data/definitions/477.html)

---

Source: [RadicalNotion.AI](https://radicalnotion.ai/cwe/cwe-477). Licensed CC BY-NC 4.0; attribute RadicalNotion.AI and link the source page when you reuse this data.
