---
title: "CWE-440: Expected Behavior Violation"
url: https://radicalnotion.ai/cwe/cwe-440
type: cwe
description: "A feature, API, or function does not perform according to its specification."
updated: 2026-11-10
source: RadicalNotion.AI
license: CC BY-NC 4.0 (https://creativecommons.org/licenses/by-nc/4.0/)
---

# CWE-440: Expected Behavior Violation

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

## Description

A feature, API, or function does not perform according to its specification.

## Modes of introduction

| Phase | Note |
| --- | --- |
| Architecture and Design | - |
| Implementation | - |
| Operation | - |

## Applicable platforms

**Technologies:** ICS/OT (Undetermined)

## Common consequences

| Scope | Impact | Note |
| --- | --- | --- |
| Other | Quality Degradation, Varies by Context | - |

## Demonstrative examples

### Example 1

The provided code is extracted from the Control and Status Register (CSR), csr\_regfile, module within the Hack@DAC'21 OpenPiton System-on-Chip (SoC). This module is designed to implement CSR registers in accordance with the RISC-V specification. The mie (machine interrupt enable) register is a 64-bit register \[REF-1384\], where bits correspond to different interrupt sources. As the name suggests, mie is a machine-level register that determines which interrupts are enabled. Note that in the example below the mie\_q and mie\_d registers represent the conceptual mie register in the RISC-V specification. The mie\_d register is the value to be stored in the mie register while the mie\_q register holds the current value of the mie register \[REF-1385\].

Bad code:

```systemverilog
module csr_regfile #(...)(...);
...
// ---------------------------
// CSR Write and update logic
// ---------------------------
...
    if (csr_we) begin
        unique case (csr_addr.address)
        ...
            riscv::CSR_SIE: begin
                // the mideleg makes sure only delegate-able register
                //(and therefore also only implemented registers) are written
                mie_d = (mie_q & ~mideleg_q) | (csr_wdata & mideleg_q) | utval_q;
            end
            ...
        endcase
    end
endmodule
```

Good code:

```systemverilog
module csr_regfile #(...)(...);
...
// ---------------------------
// CSR Write and update logic
// ---------------------------
...
    if (csr_we) begin
        unique case (csr_addr.address)
        ...
            riscv::CSR_SIE: begin
                // the mideleg makes sure only delegate-able register
                //(and therefore also only implemented registers) are written
                mie_d = (mie_q & ~mideleg_q) | (csr_wdata & mideleg_q);
            end
            ...
        endcase
    end
endmodule
```

## Observed examples

| CVE | Description |
| --- | --- |
| CVE-2003-0187 | Program uses large timeouts on unconfirmed connections resulting from inconsistency in linked lists implementations. |
| CVE-2003-0465 | "strncpy" in Linux kernel acts different than libc on x86, leading to expected behavior difference - sort of a multiple interpretation error? |
| CVE-2005-3265 | Buffer overflow in product stems the use of a third party library function that is expected to have internal protection against overflows, but doesn't. |

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

| CVE | Title | Severity | CVSS | EPSS | CISA KEV | Published |
| --- | --- | --- | --- | --- | --- | --- |
| CVE-2026-93675 | Langflow OSS is affected by multiple vulnerabilities | critical | 9.8 | - | No | 2026-10-07 |
| CVE-2017-5651 | Expected Behavior Violation in Apache Tomcat | critical | 9.8 | - | No | 2017-04-17 |
| CVE-2019-6569 | Mirror Port Isolation Vulnerability in SCALANCE X Switches | critical | 9.1 | - | No | 2019-03-26 |
| CVE-2025-8850 | Insecure API Design in danny-avila/librechat | high | 8.8 | - | No | 2025-10-30 |
| CVE-2026-120982 | Security Advisory 0207 | high | 8.7 | - | No | 2026-11-10 |
| CVE-2026-8806 | Denial-of-service (DoS) vulnerability in MELSEC iQ-F Series FX5-ENET/IP Ethernet module | high | 8.7 | - | No | 2026-06-19 |
| CVE-2018-12550 | mosquitto: improper access control in ACL file leads to use default allow policy | high | 8.1 | - | No | 2019-03-27 |
| CVE-2025-40104 | ixgbevf: fix mailbox API compatibility by negotiating supported features | high | 7.8 | - | No | 2025-10-30 |
| CVE-2023-4807 | POLY1305 MAC implementation corrupts XMM registers on Windows | high | 7.8 | - | No | 2023-09-08 |
| CVE-2019-9345 | kernel: data separation violation in sdcardfs leads to privilege escalation | high | 7.8 | - | No | 2019-09-06 |
| CVE-2026-27144 | Miscompilation allows memory corruption via CONVNOP-wrapped array copy in cmd/compile | high | 7.7 | - | No | 2026-04-08 |
| CVE-2024-30246 | Tuleap deleting or moving an artifact can delete values from unrelated artifacts | high | 7.6 | - | No | 2024-03-29 |

## Related weaknesses

| Relationship | CWE | Name |
| --- | --- | --- |
| Parent | [CWE-684](https://radicalnotion.ai/cwe/cwe-684) | Incorrect Provision of Specified Functionality |
| Child | [CWE-1434](https://radicalnotion.ai/cwe/cwe-1434) | Insecure Setting of Generative AI/ML Model Inference Parameters |

## Taxonomy mappings

| Taxonomy | Entry | Id | Fit |
| --- | --- | --- | --- |
| PLOVER | Expected behavior violation | - | - |

## Frequently asked questions

### What is CWE-440?

A feature, API, or function does not perform according to its specification.

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

68 recorded CVEs are attributed to CWE-440, including CVE-2026-93675, CVE-2017-5651 and CVE-2019-6569.

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

Exploiting CWE-440 can lead to: Quality Degradation, Varies by Context.

### Is CWE-440 actively exploited?

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

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

---

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