---
title: "CWE-684: Incorrect Provision of Specified Functionality"
url: https://radicalnotion.ai/cwe/cwe-684
type: cwe
description: "The code does not function according to its published specifications, potentially leading to incorrect usage."
updated: 2026-11-10
source: RadicalNotion.AI
license: CC BY-NC 4.0 (https://creativecommons.org/licenses/by-nc/4.0/)
---

# CWE-684: Incorrect Provision of Specified Functionality

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

## Description

The code does not function according to its published specifications, potentially leading to incorrect usage.

## Modes of introduction

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

## Common consequences

| Scope | Impact | Note |
| --- | --- | --- |
| Other | Quality Degradation, Unexpected State, Varies by Context | When providing functionality to an external party, it is important that the product behaves in accordance with the details specified. When requirements of nuances are not documented, the functionality may produce unintended behaviors for the caller, possibly leading to an exploitable state. |

## Potential mitigations

### Implementation

Ensure that your code strictly conforms to specifications.

## Demonstrative examples

### Example 1

In the following snippet from a doPost() servlet method, the server returns "200 OK" (default) even if an error occurs.

Bad code:

```java
try {

    // Something that may throw an exception.
    ...
} catch (Throwable t) {
    logger.error("Caught: " + t.toString());
    return;
}
```

### Example 2

In the following example, an HTTP 404 status code is returned in the event of an IOException encountered in a Java servlet. A 404 code is typically meant to indicate a non-existent resource and would be somewhat misleading in this case.

Bad code:

```java
try {

    // something that might throw IOException
    ...
} catch (IOException ioe) {
    response.sendError(SC_NOT_FOUND);
}
```

## Observed examples

| CVE | Description |
| --- | --- |
| CVE-2002-1446 | Error checking routine in PKCS#11 library returns "OK" status even when invalid signature is detected, allowing spoofed messages. |
| CVE-2001-1559 | Chain: System call returns wrong value (CWE-393), leading to a resultant NULL dereference (CWE-476). |
| CVE-2003-0187 | Program uses large timeouts on unconfirmed connections resulting from inconsistency in linked lists implementations. |
| CVE-1999-1446 | UI inconsistency; visited URLs list not cleared when "Clear History" option is selected. |

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

| CVE | Title | Severity | CVSS | EPSS | CISA KEV | Published |
| --- | --- | --- | --- | --- | --- | --- |
| CVE-2026-40685 | Exim: Exim: Denial of Service due to malformed JSON processing | critical | 9.8 | - | No | 2026-04-30 |
| CVE-2024-50357 | REST-APIs unintentionally enabled in Century Systems FutureNet NXR series routers | critical | 9.8 | - | No | 2024-11-29 |
| CVE-2023-24845 | Mirror Port Isolation Vulnerability in RUGGEDCOM ROS Devices | critical | 9.8 | - | No | 2023-08-08 |
| CVE-2026-52735 | ZEBRA: Consensus divergence via P2SH sigop undercount in pure-Rust disabled-opcode parser | critical | 9.3 | - | No | 2026-08-18 |
| CVE-2026-119078 | Apache Commons Codec: Blake3 doFinalize is stateless; the documented KDF example derives identical keys | critical | 9.1 | - | No | 2026-11-09 |
| CVE-2026-44597 | Tor: Tor: Denial of Service due to out-of-bounds read | critical | 9.1 | - | No | 2026-05-07 |
| CVE-2024-6425 | Incorrect Provision of Specified Functionality vulnerability in MESbook | critical | 9.1 | - | No | 2024-07-01 |
| CVE-2023-4258 | bt: mesh: vulnerability in provisioning protocol implementation on provisionee side | high | 8.6 | - | No | 2023-09-25 |
| CVE-2025-66384 | - | high | 8.2 | - | No | 2025-11-28 |
| CVE-2025-58325 | Incorrect Provision of Specified Functionality in Siemens RUGGEDCOM APE1808 | high | 7.8 | - | No | 2025-10-14 |
| CVE-2026-42255 | - | high | 7.7 | - | No | 2026-04-26 |
| CVE-2026-40684 | Exim: Exim: Denial of Service due to malformed DNS data in PTR records on musl libc systems | high | 7.5 | - | No | 2026-04-30 |

## Related weaknesses

| Relationship | CWE | Name |
| --- | --- | --- |
| Parent | [CWE-710](https://radicalnotion.ai/cwe/cwe-710) | Improper Adherence to Coding Standards |
| Child | [CWE-392](https://radicalnotion.ai/cwe/cwe-392) | Missing Report of Error Condition |
| Child | [CWE-393](https://radicalnotion.ai/cwe/cwe-393) | Return of Wrong Status Code |
| Child | [CWE-440](https://radicalnotion.ai/cwe/cwe-440) | Expected Behavior Violation |
| Child | [CWE-446](https://radicalnotion.ai/cwe/cwe-446) | UI Discrepancy for Security Feature |
| Child | [CWE-451](https://radicalnotion.ai/cwe/cwe-451) | User Interface (UI) Misrepresentation of Critical Information |
| Child | [CWE-912](https://radicalnotion.ai/cwe/cwe-912) | Hidden Functionality |
| Child | [CWE-1245](https://radicalnotion.ai/cwe/cwe-1245) | Improper Finite State Machines (FSMs) in Hardware Logic |
| Related | [CWE-1434](https://radicalnotion.ai/cwe/cwe-1434) | Insecure Setting of Generative AI/ML Model Inference Parameters |

## Taxonomy mappings

| Taxonomy | Entry | Id | Fit |
| --- | --- | --- | --- |
| CERT C Secure Coding | Do not replace secure functions with less secure functions | PRE09-C | - |

## Frequently asked questions

### What is CWE-684?

The code does not function according to its published specifications, potentially leading to incorrect usage.

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

31 recorded CVEs are attributed to CWE-684, including CVE-2026-40685, CVE-2024-50357 and CVE-2023-24845.

### How do you prevent CWE-684?

Ensure that your code strictly conforms to specifications.

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

Exploiting CWE-684 can lead to: Quality Degradation, Unexpected State, Varies by Context.

### Is CWE-684 actively exploited?

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

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

---

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