You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Injection could cover case where validation is done but does not go far enough as well as an associated recommendation using this example below.
Scenario #
“An e-commerce API validates that a quantity input parameter in a shopping cart represented in JSON is an integer but stops short at validating that the value is not a negative value. Attacker uses this vulnerability to get zero-sum totals in a transaction:
POST /ecommerce/cart
{
items:[
{
id: 123456,
quantity: 1,
price: 200
},
{
id: 789123,
quantity: -2,
price: 100
}
]
}”
How to Prevent
“Validate incoming structured data using schemas (e.g. JSON schema) that include sufficient filters to only allow valid values for each input parameter.”