API accepts HTTP requests in the clear

Issue ID: v3-global-http-clear

Average severity: Medium

Description

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

For more details, see the OpenAPI Specification.

Example

The following is an example of how this type of risk could look in your API definition. The host server of the API accepts unencrypted connections:

{
    "servers": [
        {  
            "url": "http://my.api.com"
        }
    ]
}

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

Use only secure connections for the servers:

{
    "servers": [
        {
            "url": "https://my.api.com"
        }
    ]
}