CWE-477, Use of Obsolete Function, flags code that calls deprecated or obsolete functions. MITRE's point is as much about process as about the call itself: it suggests the code has not been actively reviewed or maintained.
The weakness is not language specific. Every ecosystem retires functions.
How it happens
MITRE gives three reasons functions become obsolete: advances in the language, a better understanding of how an operation should be done effectively and securely, and changes in the conventions that govern certain operations. The retired function is usually replaced by a newer one that does the same job in a different, hopefully improved way.
Code that keeps calling the old one has missed that change. Maybe the replacement fixed a safety problem. Maybe the old function is scheduled for removal and the next upgrade will break the build. Either way, the call is a marker that nobody looked here recently.
What an attacker gains
The record lists quality degradation and no direct consequence, and no observed CVEs. The risk is indirect. The old function may have the flaw its replacement was written to fix, and old code that is unmaintained tends to hide other problems.
How to find it
MITRE describes several methods: binary or bytecode quality analysis, bytecode weakness analysis, disassembly with manual review, dynamic analysis with a debugger, and manual source review including focused spot checks. For your own source, compiler warnings and linter rules for deprecation are the cheapest start. Turn deprecation warnings on and treat new ones as build failures.
How to fix it
MITRE's steps are short.
- Read the documentation for the obsolete function to learn why it was deprecated and what replaces it.
- Think seriously about the security implications of keeping it.
- Move to the alternative functions.
Do the same for your dependencies. A library that stops getting releases is the package level version of an obsolete call. The free in-browser dependency scan at gold.safeguard.sh/scan takes a manifest, runs with no login, keeps the file on your machine and covers up to 100 dependencies.
Quick check
Is every deprecation warning a vulnerability?
No. Some are style or compatibility changes. The point is to read the reason and decide, instead of leaving the warning to pile up.