# VNX-757: TLS negotiation allows an obsolete protocol version or broken cipher suite (algorithm downgrade)

Reports TLS configuration that lets peers negotiate SSL 2/3, TLS 1.0 or TLS 1.1, or offers an RC4, DES, NULL, EXPORT or anonymous cipher suite, in Go.

| Field | Value |
|---|---|
| Rule ID | `VNX-757` |
| Severity | High |
| SARIF level | `error` |
| Kind | `sast` |
| Languages | Go, Java, Python |
| CWE | [CWE-757](https://cwe.mitre.org/data/definitions/757.html) |
| CAPEC | [CAPEC-66](https://capec.mitre.org/data/definitions/66.html) |
| ATT&CK | [T1190](https://attack.mitre.org/techniques/T1190/) |
| CWSS vector | `CWSS:1.0/TI:H/AP:A/AL:A/IC:N/FC:LT/RP:N/RL:A/AV:I/AS:N/IN:A/SC:A/BI:H/DI:H/EX:H/EC:N/P:H` |
| Tags | `crypto` `tls` `downgrade` `cwe-757` |
| Source | [`internal/sast/rules/vnx-757.rego`](https://github.com/Vulnesis/cli/blob/main/internal/sast/rules/vnx-757.rego) |

## Overview

VNX-757 maps to [CWE-757: Selection of Less-Secure Algorithm During Negotiation ('Algorithm Downgrade')](https://cwe.mitre.org/data/definitions/757.html). It reports TLS settings that let a connection settle on an obsolete protocol version or a broken cipher suite: Go `tls.Config` `MinVersion`/`MaxVersion` set to `VersionSSL30`, `VersionTLS10` or `VersionTLS11`, and RC4/3DES suites in `CipherSuites`; Java `SSLContext.getInstance("TLSv1")`, `setEnabledProtocols`/`setEnabledCipherSuites` with obsolete values, the `https.protocols` and `jdk.tls.*.protocols` properties, and a `jdk.tls.disabledAlgorithms` value that no longer disables SSLv3; Python `ssl.PROTOCOL_TLSv1`-style constants, pyOpenSSL `TLSv1_METHOD`, a lowered `minimum_version`, cleared `OP_NO_*` flags and `set_ciphers()` strings that enable RC4, DES, NULL, EXPORT, LOW or MD5.

It does not report TLS 1.2/1.3, `SSLContext.getInstance("TLS")`, comparisons or lookup tables of version constants, version names in log messages or comments, excluded cipher tokens (`!RC4`) or test files.

## Why this matters

An attacker in the network path can strip the stronger options from the handshake. If the server or client still accepts SSL 3.0 or TLS 1.0, or still offers RC4 or export suites, the connection falls back to them, and POODLE, BEAST, RC4 biases and similar attacks then apply.

## What gets flagged

```go
return &tls.Config{
    MinVersion: tls.VersionTLS10,                 // flagged
    CipherSuites: []uint16{
        tls.TLS_RSA_WITH_RC4_128_SHA,             // flagged
    },
}
```

```java
SSLContext ctx = SSLContext.getInstance("TLSv1");                    // flagged
s.setEnabledProtocols(new String[] {"TLSv1.2", "TLSv1.1", "TLSv1"});  // flagged
```

```python
ctx = ssl.SSLContext(ssl.PROTOCOL_TLSv1)          # flagged
ctx.minimum_version = ssl.TLSVersion.TLSv1        # flagged
ctx.set_ciphers("ECDHE+AESGCM:RC4-SHA:!aNULL")    # flagged
```

## Remediation

1. Set the minimum protocol to TLS 1.2 (`tls.VersionTLS12`, `ssl.TLSVersion.TLSv1_2`, `SSLContext.getInstance("TLS")` with `setEnabledProtocols(new String[]{"TLSv1.3", "TLSv1.2"})`).
2. Offer only AEAD cipher suites (AES-GCM, ChaCha20-Poly1305) with forward secrecy, or leave the library defaults in place.
3. Keep SSLv3, TLSv1 and TLSv1.1 in `jdk.tls.disabledAlgorithms`.

## References

- [CWE-757: Selection of Less-Secure Algorithm During Negotiation](https://cwe.mitre.org/data/definitions/757.html)
- [RFC 8996: Deprecating TLS 1.0 and TLS 1.1](https://www.rfc-editor.org/rfc/rfc8996)
- [OWASP Transport Layer Security Cheat Sheet](https://cheatsheetseries.owasp.org/cheatsheets/Transport_Layer_Security_Cheat_Sheet.html)

## Suppressing this rule

Put a `nosec` comment on the line, or on line 1 to cover the whole file. Use the comment marker of the file's language (`#`, `//`, `--` or `;`):

```text
# nosec vnx-757
// nosec vnx-757
```

Or record an ignore rule: `vulnetix ignore add --rule vnx-757 --reason "..."`. See [Suppressing findings](/sast/guides/suppressing-findings.md).
