QID 580520
QID 580520: Enum Fields Mismatch Schema Definition
In this scenario fields of string type with enum values defined are tested. This test is skipped for all enum fields where values are not defined. Values that are not part of the defined enum values are sent to the server for the endpoint being tested.The expectation is that APIs will reject the request as invalid, instead of accepting the undefined value or defaulting to a defined enum value. The response from server for requests with value not defined in swagger file should match the schema definition for invalid request.
Based on the response using requests with invalid values it is determined that the response to unexpected values to enum fields does not match schema definition for field being tested.
Enforcing defined values and responses in swagger file for enum fields will help provide clarity to the API users and avoid abuse of the API by hackers. Since handling enum field types is not adhering to the schema, the current end point is potential to resource exhaustion attacks.
CVEs related to QID 580520
| Advisory ID | Software | Component | Link |
|---|