---
title: "CWE-346: Origin Validation Error"
url: https://radicalnotion.ai/cwe/cwe-346
type: cwe
description: "The product does not properly verify that the source of data or communication is valid."
updated: 2026-11-10
source: RadicalNotion.AI
license: CC BY-NC 4.0 (https://creativecommons.org/licenses/by-nc/4.0/)
---

# CWE-346: Origin Validation Error

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

## Description

The product does not properly verify that the source of data or communication is valid.

## Modes of introduction

| Phase | Note |
| --- | --- |
| Architecture and Design | - |
| Implementation | REALIZATION: This weakness is caused during implementation of an architectural security tactic. |

## Applicable platforms

**Technologies:** Web Based (Undetermined)

## Common consequences

| Scope | Impact | Note |
| --- | --- | --- |
| Access Control, Other | Gain Privileges or Assume Identity, Varies by Context | An attacker can access any functionality that is inadvertently accessible to the source. |

## Detection methods

### Automated Static Analysis

Automated static analysis, commonly referred to as Static Application Security Testing (SAST), can find some instances of this weakness by analyzing source code (or binary/compiled code) without having to execute it. Typically, this is done by building a model of data flow and control flow, then searching for potentially-vulnerable patterns that connect "sources" (origins of input) with "sinks" (destinations where the data interacts with external components, a lower layer such as the OS, etc.)

## Demonstrative examples

### Example 1

This Android application will remove a user account when it receives an intent to do so:

Bad code:

```java
IntentFilter filter = new IntentFilter("com.example.RemoveUser");
MyReceiver receiver = new MyReceiver();
registerReceiver(receiver, filter);

public class DeleteReceiver extends BroadcastReceiver {
    @Override
    public void onReceive(Context context, Intent intent) {
        int userID = intent.getIntExtra("userID");
        destroyUserData(userID);
    }
}
```

This application does not check the origin of the intent, thus allowing any malicious application to remove a user. Always check the origin of an intent, or create an allowlist of trusted applications using the manifest.xml file.

### Example 2

These Android and iOS applications intercept URL loading within a WebView and perform special actions if a particular URL scheme is used, thus allowing the Javascript within the WebView to communicate with the application:

Bad code:

```java
// Android
@Override
public boolean shouldOverrideUrlLoading(WebView view, String url){
    if (url.substring(0,14).equalsIgnoreCase("examplescheme:")){
        if(url.substring(14,25).equalsIgnoreCase("getUserInfo")){
            writeDataToView(view, UserData);
            return false;
        }
        else{
            return true;
        }
    }
}
```

Bad code:

```objective-c
// iOS
-(BOOL) webView:(UIWebView *)exWebView shouldStartLoadWithRequest:(NSURLRequest *)exRequest navigationType:(UIWebViewNavigationType)exNavigationType
{
    NSURL *URL = [exRequest URL];
    if ([[URL scheme] isEqualToString:@"exampleScheme"])
    {
        NSString *functionString = [URL resourceSpecifier];
        if ([functionString hasPrefix:@"specialFunction"])
        {

            // Make data available back in webview.
            UIWebView *webView = [self writeDataToView:[URL query]];
        }
        return NO;
    }
    return YES;
}
```

Attack code:

```javascript
window.location = examplescheme://method?parameter=value
```

## Observed examples

| CVE | Description |
| --- | --- |
| CVE-2000-1218 | DNS server can accept DNS updates from hosts that it did not query, leading to cache poisoning |
| CVE-2018-6074 | Browser does not set Mark-of-the-Web (MotW) for a downloaded .EXE file if the name is close to the maximum path length, preventing recording of a zone identifier in the filename |
| CVE-2025-0411 | Zip file extraction program does not propagate Mark-of-the-Web (MotW) metadata to files that are extracted from an Internet-downloaded Zip file |
| CVE-2025-46652 | Zip file extraction program does not propagate Mark-of-the-Web (MotW) metadata to files that are extracted from an Internet-downloaded Zip file |
| CVE-2005-0877 | DNS server can accept DNS updates from hosts that it did not query, leading to cache poisoning |
| CVE-2001-1452 | DNS server caches glue records received from non-delegated name servers |
| CVE-2005-2188 | user ID obtained from untrusted source (URL) |
| CVE-2003-0174 | LDAP service does not verify if a particular attribute was set by the LDAP server |
| CVE-1999-1549 | product does not sufficiently distinguish external HTML from internal, potentially dangerous HTML, allowing bypass using special strings in the page title. Overlaps special elements. |
| CVE-2003-0981 | Product records the reverse DNS name of a visitor in the logs, allowing spoofing and resultant XSS. |

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

| CVE | Title | Severity | CVSS | EPSS | CISA KEV | Published |
| --- | --- | --- | --- | --- | --- | --- |
| CVE-2025-34291 | Langflow \<= 1.6.9 CORS Misconfiguration to Token Hijack & RCE | critical | 9.4 | - | Yes | 2025-12-05 |
| CVE-2015-4495 | Mozilla Firefox Security Feature Bypass Vulnerability | critical | 9.4 | - | Yes | 2015-08-08 |
| CVE-2026-42901 | Microsoft Entra ID Elevation of Privilege Vulnerability | critical | 10.0 | - | No | 2026-05-22 |
| CVE-2025-9265 | API Authentication Bypass via Header Spoofing vulnerability in Kiloview NDI N30 Products | critical | 10.0 | - | No | 2025-10-13 |
| CVE-2026-97381 | Legacy Update ActiveX control accepts unauthorized hosting origins | critical | 9.9 | - | No | 2026-10-13 |
| CVE-2026-84140 | Site isolation issue in the DOM: Navigation component | critical | 9.8 | - | No | 2026-09-01 |
| CVE-2026-84133 | Site isolation issue in the DOM: Push Subscriptions component | critical | 9.8 | - | No | 2026-09-01 |
| CVE-2026-84129 | Site isolation issue in the DOM: Navigation component | critical | 9.8 | - | No | 2026-09-01 |
| CVE-2026-18847 | IBM i is Affected By Multiple Vulnerabilities in Navigator for i | critical | 9.8 | - | No | 2026-08-12 |
| CVE-2026-16442 | Keycloak-services: keycloak-services: saml idp-initiated broker login bypasses link-only restriction | critical | 9.8 | - | No | 2026-08-05 |
| CVE-2026-16387 | Site isolation issue in the Networking component | critical | 9.8 | - | No | 2026-07-21 |
| CVE-2026-16358 | Site isolation issue in the Graphics: WebRender component | critical | 9.8 | - | No | 2026-07-21 |

## Related attack patterns (CAPEC)

- [CAPEC-111](https://radicalnotion.ai/capec/capec-111): JSON Hijacking (aka JavaScript Hijacking)
- [CAPEC-141](https://radicalnotion.ai/capec/capec-141): Cache Poisoning
- [CAPEC-142](https://radicalnotion.ai/capec/capec-142): DNS Cache Poisoning
- [CAPEC-160](https://radicalnotion.ai/capec/capec-160): Exploit Script-Based APIs
- [CAPEC-21](https://radicalnotion.ai/capec/capec-21): Exploitation of Trusted Identifiers
- [CAPEC-384](https://radicalnotion.ai/capec/capec-384): Application API Message Manipulation via Man-in-the-Middle
- [CAPEC-385](https://radicalnotion.ai/capec/capec-385): Transaction or Event Tampering via Application API Manipulation
- [CAPEC-386](https://radicalnotion.ai/capec/capec-386): Application API Navigation Remapping
- [CAPEC-387](https://radicalnotion.ai/capec/capec-387): Navigation Remapping To Propagate Malicious Content
- [CAPEC-388](https://radicalnotion.ai/capec/capec-388): Application API Button Hijacking
- [CAPEC-510](https://radicalnotion.ai/capec/capec-510): SaaS User Request Forgery
- [CAPEC-59](https://radicalnotion.ai/capec/capec-59): Session Credential Falsification through Prediction
- [CAPEC-60](https://radicalnotion.ai/capec/capec-60): Reusing Session IDs (aka Session Replay)
- [CAPEC-75](https://radicalnotion.ai/capec/capec-75): Manipulating Writeable Configuration Files
- [CAPEC-76](https://radicalnotion.ai/capec/capec-76): Manipulating Web Input to File System Calls
- [CAPEC-89](https://radicalnotion.ai/capec/capec-89): Pharming

## Related weaknesses

| Relationship | CWE | Name |
| --- | --- | --- |
| Parent | [CWE-284](https://radicalnotion.ai/cwe/cwe-284) | Improper Access Control |
| Parent | [CWE-345](https://radicalnotion.ai/cwe/cwe-345) | Insufficient Verification of Data Authenticity |
| Child | [CWE-940](https://radicalnotion.ai/cwe/cwe-940) | Improper Verification of Source of a Communication Channel |
| Child | [CWE-1385](https://radicalnotion.ai/cwe/cwe-1385) | Missing Origin Validation in WebSockets |
| Peer | [CWE-451](https://radicalnotion.ai/cwe/cwe-451) | User Interface (UI) Misrepresentation of Critical Information |
| Related | [CWE-352](https://radicalnotion.ai/cwe/cwe-352) | Cross-Site Request Forgery |
| Related | [CWE-384](https://radicalnotion.ai/cwe/cwe-384) | Session Fixation |

## Taxonomy mappings

| Taxonomy | Entry | Id | Fit |
| --- | --- | --- | --- |
| PLOVER | Origin Validation Error | - | - |
| ISA/IEC 62443 | Req SR 2.12 RE(1) | Part 3-3 | - |
| ISA/IEC 62443 | Req SD-1 | Part 4-1 | - |
| ISA/IEC 62443 | Req SR-2 | Part 4-1 | - |
| ISA/IEC 62443 | Req SVV-1 | Part 4-1 | - |
| ISA/IEC 62443 | Req CR 2.12 RE(1) | Part 4-2 | - |
| ISA/IEC 62443 | Req CR 3.1 RE(1) | Part 4-2 | - |

## Frequently asked questions

### What is CWE-346?

The product does not properly verify that the source of data or communication is valid.

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

846 recorded CVEs are attributed to CWE-346, including CVE-2025-34291, CVE-2015-4495 and CVE-2026-42901. 2 are listed in CISA's Known Exploited Vulnerabilities (KEV) catalog.

### How is CWE-346 detected?

Automated Static Analysis: Automated static analysis, commonly referred to as Static Application Security Testing (SAST), can find some instances of this weakness by analyzing source code (or binary/compiled code) without having to execute it. Typically, this is done by building a model of data flow and control flow, then searching for potentially-vulnerable patterns that connect "sources" (origins of input) with "sinks" (destinations where the data interacts with external components, a lower layer such as the OS, etc.)

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

Exploiting CWE-346 can lead to: Gain Privileges or Assume Identity, Varies by Context.

### Is CWE-346 actively exploited?

Yes. 2 CWE-346 vulnerabilities are in CISA's KEV catalog of actively exploited flaws, out of 846 recorded CVEs.

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

---

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