Description
The product receives input from an upstream component, but it does not account for byte ordering (e.g. big-endian and little-endian) when processing the input, causing an incorrect number or value to be used.
Potential Impact
Integrity
Unexpected State
Detection Methods
- Black Box — Because byte ordering bugs are usually very noticeable even with normal inputs, this bug is more likely to occur in rarely triggered error conditions, making them difficult to detect using black box methods.
Related Weaknesses
Taxonomy Mappings
- PLOVER: — Numeric Byte Ordering Error
- The CERT Oracle Secure Coding Standard for Java (2011): FIO12-J — Provide methods to read and write little-endian data
Frequently Asked Questions
What is CWE-198?
CWE-198 (Use of Incorrect Byte Ordering) is a software weakness identified by MITRE's Common Weakness Enumeration. It is classified as a Variant-level weakness. The product receives input from an upstream component, but it does not account for byte ordering (e.g. big-endian and little-endian) when processing the input, causing an incorrect number or value to...
How can CWE-198 be exploited?
Attackers can exploit CWE-198 (Use of Incorrect Byte Ordering) to unexpected state. This weakness is typically introduced during the Implementation phase of software development.
How do I prevent CWE-198?
Follow secure coding practices, conduct code reviews, and use automated security testing tools (SAST/DAST) to detect this weakness early in the development lifecycle.
What is the severity of CWE-198?
CWE-198 is classified as a Variant-level weakness (Low-Medium abstraction). Its actual severity depends on the specific context and how the weakness manifests in your application.