API accepts HTTP requests in the clear

Average severity: Medium

Description

The API accepts HTTP communications in the clear. HTTP traffic is not encrypted and can thus be easily intercepted.

Example

The following is an example of how this type of risk could look in your API definition:

"schemes": [
    "http"
  ],

Having both HTTP and HTTPS enabled does not help, you are still accepting unencrypted connections:

"schemes": [
    "https",
    "http"
  ],

Possible exploit scenario

If your API supports unencrypted HTTP connections, all requests and responses are transmitted in the open. Anyone listening to the network traffic while the calls are being made may intercept them.

Remediation

Remove http from the schemes list, and only include https:

{
  "schemes": [
    "https"
  ],
}

 


Get API Security news directly in your Inbox.

By clicking Subscribe you agree to our Data Policy