CWE-912, Hidden Functionality, is any capability that is not documented, not part of the specification, and not reachable through an obvious interface or command sequence. It affects software vendors, firmware makers, and anyone who ships or installs third party code.
How it happens
MITRE lists several forms: intentionally malicious code, Easter eggs with extraneous functions such as games, and developer shortcuts that cut support costs, such as hard-coded accounts. Intent does not change the risk. Even when the feature is harmless, it increases the attack surface and can expose weaknesses beyond the intended functionality. Even if hard to reach, it may help attacks that alter the control flow of the application.
Two observed examples show the range:
- CVE-2022-31260 (details): a digital asset management program had an undisclosed backdoor in the legacy version of a PHP script that could let an unauthenticated user export metadata.
- CVE-2022-3203: a wireless access point manual said configuration was only through the web interface, but an undisclosed telnet server was active by default.
What an attacker gains
MITRE records the impact as integrity, varying by context, with the ability to alter execution logic. In practice that means whatever the hidden feature can do, with whatever access it has.
How to find it
MITRE suggests running code coverage analysis during live testing, then closely inspecting any code that was never executed. Code nobody can reach through documented paths is where hidden features live. Also compare what a device or service actually exposes against its documentation. Scan open ports and listening services and ask why each one exists.
How to fix it
For the code you write, remove debug hooks, hard-coded credentials and unused endpoints before release, and review every change that adds a path not covered by the spec.
For software you install, MITRE gives one mitigation: always verify the integrity of the product that is being installed. This is where supply chain tooling earns its place. Checking signatures and provenance tells you the package is the one the publisher built, so nothing was added after the fact.
Try it yourself
The demo walks through checking provenance and attestation for a build.
Click through it at your own pace, or open it full screen.
Quick check
Is harmless hidden functionality still a weakness?
Yes. MITRE notes it increases the attack surface and can expose additional weaknesses even when it was not meant to be malicious.
How can coverage testing help?
Run live tests, then inspect code that was never covered. Unreachable or undocumented paths deserve the closest look.