---
title: "CWE-1474: Non-Equivalent Data Transformation"
url: https://radicalnotion.ai/cwe/cwe-1474
type: cwe
description: "The product parses or transforms data into another format, structure, or representation, but the newly-produced data is not semantically equivalent to the original data."
updated: 2026-11-10
source: RadicalNotion.AI
license: CC BY-NC 4.0 (https://creativecommons.org/licenses/by-nc/4.0/)
---

# CWE-1474: Non-Equivalent Data Transformation

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

## Description

The product parses or transforms data into another format, structure, or representation, but the newly-produced data is not semantically equivalent to the original data.

## Modes of introduction

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

## Common consequences

| Scope | Impact | Note |
| --- | --- | --- |
| Integrity, Other | Bypass Protection Mechanism, Unexpected State, Varies by Context | - |

## Potential mitigations

### Architecture and Design, Implementation

Validate the transformed data against what was expected to be produced. If the data is complex and free-form with some "special elements" in them, consider re-parsing the output to ensure that it matches expectations.

## Detection methods

### Manual Analysis

Examine inputs that will be saved or otherwise processed, then look at how they are produced in output. Analyze outputs that are expected to be (1) unchanged from the inputs, or (2) changed in a controlled way. Consider analyzing the data to extract key elements, such as e-mail addresses or domain names, to ensure that they are consistent with the original input.

Effectiveness: Moderate. These methods could have mixed results depending on how the product receives the data, transforms it, and outputs the data. It might require domain-specific knowledge of the product's intended behavior in order to determine if some transformations were correct. These methods could be time-consuming and not necessarily complete, but there might not be well-established and well-understood methods for some subtypes of this weakness.

### Automated Dynamic Analysis

Examine inputs that will be saved or otherwise processed, then look at how they are produced in output. Analyze outputs that are expected to be (1) unchanged from the inputs, or (2) changed in a controlled way. Consider analyzing the data to extract key elements, such as e-mail addresses or domain names, to ensure that they are consistent with the original input.

Effectiveness: Moderate. These methods could have mixed results depending on how the product receives the data, transforms it, and outputs the data. It might require domain-specific knowledge of the product's intended behavior in order to determine if some transformations were correct. These methods could be time-consuming and not necessarily complete, but there might not be well-established and well-understood methods for some subtypes of this weakness.

## Demonstrative examples

### Example 1

Consider a product that uses an automated language translation service that is used to translate vendor-controlled web pages that are used for technical support. Consider that these web pages include domain names and email addresses for users to access.

Bad code:

```algorithm
The product invokes the translation service on the entire message text without any special treatment or consideration for contact information such as email addresses and domain.
```

Good code:

```algorithm
The code could be changed to mark which words or phrase should not be translated. Alternately, the original web pages could be structured in a way that uses templates that insert non-translatable data such as email addresses. A third option could be to analyze the resulting output and compare expected data elements against an allowlist of known-valid values.
```

If the translation is from English to Polish, then "example.com" might be translated to "przyklad.com" - a different web site entirely. Alternately, an email address such as "address@example.com" could be translated to "adres@przyklad.com". If an attacker can control the domain or email address that is generated by the translation, then the attacker might be able to spoof communications with the product's users.

## Observed examples

| CVE | Description |
| --- | --- |
| CVE-2022-48279 | Web Application Firewall (WAF) does not parse HTTP multipart requests correctly, allowing bypass. |
| CVE-2022-24723 | JavaScript URL library does not correctly parse URLs with leading whitespace. |

## Related weaknesses

| Relationship | CWE | Name |
| --- | --- | --- |
| Parent | [CWE-664](https://radicalnotion.ai/cwe/cwe-664) | Improper Control of a Resource Through its Lifetime |
| Child | [CWE-704](https://radicalnotion.ai/cwe/cwe-704) | Incorrect Type Conversion or Cast |

## Frequently asked questions

### What is CWE-1474?

The product parses or transforms data into another format, structure, or representation, but the newly-produced data is not semantically equivalent to the original data.

### How do you prevent CWE-1474?

Validate the transformed data against what was expected to be produced. If the data is complex and free-form with some "special elements" in them, consider re-parsing the output to ensure that it matches expectations.

### How is CWE-1474 detected?

Manual Analysis: Examine inputs that will be saved or otherwise processed, then look at how they are produced in output. Analyze outputs that are expected to be (1) unchanged from the inputs, or (2) changed in a controlled way. Consider analyzing the data to extract key elements, such as e-mail addresses or domain names, to ensure that they are consistent with the original input.

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

Exploiting CWE-1474 can lead to: Bypass Protection Mechanism, Unexpected State, Varies by Context.

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

---

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