348 – Use consistent encoding
Summary
System components must use the same encodings and parsers.
Description
System components use structured messages to communicate with other components. When these messages include input from untrusted sources and this input is not properly escaped, they become prone to the insertion of malicious commands. A part of the escaping process can be done by encoding the output messages. However, all components must use consistent encoding in order to prevent attacks that benefit from the presence of different parsing behaviors, e.g., Server-Side Request Forgery (SSRF) and Remote File Inclusion (RFI) attacks.
Supported In
Advanced: True
References
- CAPEC-33. HTTP request smuggling
- CAPEC-43. Exploiting multiple input interpretation layers
- CAPEC-153. Input data manipulation
- CWE-116. Improper encoding or escaping of output
- CWE-838. Inappropriate encoding for output context
- OWASP10-A4. Insecure design
- OWASPM10-M1. Improper platform usage
- OWASPM10-M7. Poor code quality
- AGILE-11. Best architectures, requirements, and designs
- BIZEC-APP-05. Directory traversal
- HITRUST-09_v. Electronic messaging
- HITRUST-10_e. Output data validation
- ISO27002-8_28. Secure coding
- IEC62443-IAC-1_13. Access via untrusted networks
- WASSEC-5_3. Parser tolerance
- NISTSSDF-PW_4_1. Reuse existing, well-secured software when feasible instead of duplicating functionality
- PTES-6_2_1_1. Exploitation - Countermeasures (anti-virus encoding)
- CWE25-918. Server-side request forgery (SSRF)
- OSAMM-SA. Security Architecture
- ASVS-5_3_9. Output encoding and injection prevention
- ASVS-12_3_3. File execution
- ASVS-13_1_1. Generic web service security
- ISO27001-8_28. Secure coding
- CASA-5_3_9. Output Encoding and Injection Prevention
- CASA-13_1_1. Generic Web Service Security
- OWASPAPI-API7. Server Side Request Forgery
- SANS25-19. Server-side request forgery (SSRF)
Last updated
2024/02/09