Kingdom: API Abuse

An API is a contract between a caller and a callee. The most common forms of API abuse are caused by the caller failing to honor its end of this contract. For example, if a program fails to call chdir() after calling chroot(), it violates the contract that specifies how to change the active root directory in a secure fashion. Another good example of library abuse is expecting the callee to return trustworthy DNS information to the caller. In this case, the caller abuses the callee API by making certain assumptions about its behavior (that the return value can be used for authentication purposes). One can also violate the caller-callee contract from the other side. For example, if a coder subclasses SecureRandom and returns a non-random value, the contract is violated.

Often Misused: HTTP Method Override

Abstract
Attackers may bypass server protections against dangerous HTTP verbs using override techniques.
Explanation
In order to protect access to various resources, web servers may be configured to prevent the usage of specific HTTP verbs. However, some web frameworks provide a way to override the HTTP verb by using HTTP request headers. This feature is typically used when a web or proxy server restricts certain verbs, but the application needs to use them, especially in RESTful services. However, it is possible for a malicious user to take advantage of this feature. Doing so may allow the attacker to perform unintended actions on protected resources in the web application.

The attack works by using a trusted HTTP verb such as GET or POST, but adds request headers such as X-HTTP-Method, X-HTTP-Method-Override, or X-Method-Override to provide a restricted verb such as PUT or DELETE. Doing so will force the request to be interpreted by the target application using the verb in the request header instead of the actual HTTP verb. In certain cases, the restricted verb may also be used in query or post parameters instead of a request header.
References
[1] MSDN Microsoft
[2] ExpressJS ExpressJS
[3] Standards Mapping - Common Weakness Enumeration CWE ID 749
[4] Standards Mapping - DISA Control Correlation Identifier Version 2 CCI-000381
[5] Standards Mapping - FIPS200 AC
[6] Standards Mapping - General Data Protection Regulation (GDPR) Access Violation
[7] Standards Mapping - NIST Special Publication 800-53 Revision 4 AC-3 Access Enforcement (P1)
[8] Standards Mapping - OWASP Top 10 2004 A2 Broken Access Control
[9] Standards Mapping - OWASP Top 10 2007 A10 Failure to Restrict URL Access
[10] Standards Mapping - OWASP Top 10 2010 A8 Failure to Restrict URL Access
[11] Standards Mapping - OWASP Top 10 2013 A7 Missing Function Level Access Control
[12] Standards Mapping - OWASP Top 10 2017 A5 Broken Access Control
[13] Standards Mapping - OWASP Mobile 2014 M1 Weak Server Side Controls
[14] Standards Mapping - OWASP Application Security Verification Standard 4.0 14.5.1 Validate HTTP Request Header Requirements
[15] Standards Mapping - Payment Card Industry Data Security Standard Version 3.0 Requirement 6.5.6
[16] Standards Mapping - Payment Card Industry Data Security Standard Version 3.1 Requirement 6.5.7
[17] Standards Mapping - Payment Card Industry Data Security Standard Version 3.2 Requirement 6.5.8
[18] Standards Mapping - Payment Card Industry Data Security Standard Version 3.2.1 Requirement 6.5.8
[19] Standards Mapping - Payment Card Industry Software Security Framework 1.0 Control Objective 5.4 - Authentication and Access Control
[20] Standards Mapping - SANS Top 25 2011 Risky Resource Management - CWE ID 676
[21] Standards Mapping - Security Technical Implementation Guide Version 3.7 APP3110 CAT II
[22] Standards Mapping - Security Technical Implementation Guide Version 3.9 APP3110 CAT II
[23] Standards Mapping - Security Technical Implementation Guide Version 3.10 APP3110 CAT II
[24] Standards Mapping - Security Technical Implementation Guide Version 4.1 APSC-DV-001500 CAT II
[25] Standards Mapping - Security Technical Implementation Guide Version 4.2 APSC-DV-001500 CAT II
[26] Standards Mapping - Security Technical Implementation Guide Version 4.3 APSC-DV-001500 CAT II
[27] Standards Mapping - Security Technical Implementation Guide Version 4.4 APSC-DV-001500 CAT II
[28] Standards Mapping - Security Technical Implementation Guide Version 4.5 APSC-DV-001500 CAT II
[29] Standards Mapping - Security Technical Implementation Guide Version 4.6 APSC-DV-001500 CAT II
[30] Standards Mapping - Security Technical Implementation Guide Version 4.7 APSC-DV-001500 CAT II
[31] Standards Mapping - Security Technical Implementation Guide Version 4.8 APSC-DV-001500 CAT II
[32] Standards Mapping - Security Technical Implementation Guide Version 4.9 APSC-DV-001500 CAT II
[33] Standards Mapping - Security Technical Implementation Guide Version 4.10 APSC-DV-001500 CAT II
[34] Standards Mapping - Security Technical Implementation Guide Version 4.11 APSC-DV-001500 CAT II
[35] Standards Mapping - Web Application Security Consortium 24 + 2 Abuse of Functionality
[36] Standards Mapping - Web Application Security Consortium Version 2.00 Abuse of Functionality (WASC-42)
desc.dynamic.xtended_preview.often_misused_http_method_override