Skip to content

Bug class · Advanced

Cryptographic weaknesses

Encryption, signatures, randomness or certificate checks that do not protect what they claim to.

median public bounty
$900

Covers CWE 310, 326, 327, 328, 330, 331, 338, 347, 295, 297.

How it works

Full lesson

The pattern behind every report in this class.

Cryptographic weaknesses are flaws in how software uses encryption, signatures, certificates or randomness, rather than breaks of the underlying maths. In bug bounty terms they usually show up as a check that is missing, skipped or applied to the wrong thing: a TLS client that does not verify a hostname, a session cache that resumes across different trust settings, a token generator seeded from a clock. The evidence here is dominated by TLS and SSH client libraries, where certificate, hostname, OCSP and pinning checks are implemented per backend and one backend quietly disagrees with another.

Programs care because these flaws turn into interception, impersonation and account takeover. A skipped hostname check lets an attacker with any trusted certificate read or alter traffic; a session resumed across trust settings carries a weaker decision into a stronger context; a predictable token or a weak session secret lets someone forge their way in. The reports behind this lesson range from protocol-level issues in TLS stacks to application-level mistakes such as a naive hash construction or a non-constant-time comparison.

It is most often found in client-side and library code rather than in a single web endpoint: HTTP client TLS backends, SSH backends, mail clients, proxy agents, mobile apps and SDKs. It also appears in application logic that touches secrets, tokens, sessions and signatures. The common thread is that the security decision is made in one place and assumed everywhere else, so a per-backend or per-path difference is where the bug lives.

Start from the trust decision the code is supposed to make. For a TLS client that means: is this certificate chained to a trusted root, is it valid now, is it revoked, does its name match the host I meant to reach, and does its key match what I pinned. Each of those is a separate check, and the evidence shows them being implemented per backend, so the first question is which backend is in use and whether it performs all of them.

Things to try

All 248

Each line worked in a disclosed report. Test only what a program's scope allows.

Other 60

  • Capture traffic from a VPN client and check whether any payload leaves in plaintext towards the VPN server address.
  • Check whether the encryption module enforces proper permissions and integrity protection on encrypted data.
  • Search old commits and removed files in a public repository for API keys or private keys that were committed and never rotated.
  • Submit a report to a program and check whether the program's scope validation can be bypassed or misapplied.

Certificate validation and hostname checks 30

  • Make an HTTPS request with rejectUnauthorized set to undefined and check whether certificate validation is disabled.
  • Configure mTLS and check whether certificate authentication is done correctly.
  • Query the domain's CAA DNS records and check whether a Certificate Authority Authorization rule is missing.
  • Connect to an IP address written with non-ASCII or non-canonical digits and check whether a certificate with a DNS name is accepted.

HSTS and transport security headers 18

  • Request the login or account pages over plain HTTP and check whether the server redirects to HTTPS or serves content in cleartext.
  • Intercept the service's communications and check whether HTTPS is used.
  • Inspect the Content-Security-Policy header and check whether unsafe-inline is used without a nonce.
  • Check whether the X-Content-Type-Options header is set to nosniff.

Session resumption and connection reuse 15

  • Test whether the TLS stack is vulnerable to the triple handshake attack by checking the OpenSSL version and whether session resumption and renegotiation are handled safely.
  • Test whether the server is vulnerable to TLS virtual host confusion by connecting with different SNI values and observing which certificate and session are returned.
  • Resume a TLS session that was validated with the native CA store from a transfer that disabled it and check whether the session is reused.
  • Change the case of a CA path and check whether the session cache bypasses the active trust profile.

SSH host keys and algorithm configuration 10

  • Use a default protocol setting that selects SSH and check whether host verification is skipped.
  • Connect over SFTP with a backend that has no host key callback and check whether an unknown server host key is accepted.
  • Connect to the SSH server with an invalid signature and check whether it is rejected.
  • Enumerate the SSH server's supported algorithms and check for vulnerable or deprecated ones.

Bypasses and variations

All 41
  • Requesting certificate status enforcement is silently bypassed on several backends and trust paths, so revoked certificates are accepted.
  • Adding trailing dots to a host name, or importing a crafted HSTS cache, bypasses or disables the HSTS policy for that host.
  • Pinning checks are skipped on some backends or protocol versions, so a different certificate or key is accepted.
  • Resuming a previously validated session skips re-checking the certificate, its expiry, revocation or host identity.
  • Host key verification is skipped on connection reuse, on redirects to SFTP or SCP, and when a default protocol selects SSH.
  • Writing an IP address in non-canonical or fullwidth digits, or with a leading dot, causes the hostname check to treat it as a DNS name.

Typical fixes

All 115
  • Disable deprecated protocols such as SSLv2, SSLv3 and TLS 1.0 and enable only modern TLS versions.
  • Use a constant-time comparison function for API token and HMAC verification.
  • Use an authenticated encryption mode and return uniform error messages for decryption failures.
  • Disable 64-bit block ciphers such as 3DES.
  • Verify the certificate hostname in all TLS clients.
  • Set a Strict-Transport-Security header with a sufficiently long max-age on all HTTPS responses.

Tips for beginners

All 15
  • Begin with the client, not the server. The richest findings here are in HTTP client TLS backends, SSH backends, mail clients and proxy agents, where checks are implemented per backend. Read the code or documentation for each backend and compare what each one verifies.
  • Test hostname verification with an IP address and with a certificate for an unrelated name. A check guarded by the presence of a server name indication will pass the DNS case and fail the IP case, which is a clean, reproducible demonstration.
  • Test certificate status properly. Present a stapled OCSP response that reports a revoked status, and separately request enforcement on a build that uses the Apple trust path, then check whether the connection still completes. A response being present is not the same as its status being good.
  • Test session resumption across trust settings. Resume a session that was validated with the native CA store from a transfer that disabled it, or under a stricter signature algorithm policy from a permissive sibling, and see whether the weaker decision is reused.
  • Test connection reuse. Reuse an existing connection for a request that requires TLS, or after changing the verify callback or SSL configuration flags, and check whether the new requirement or setting is honoured.
  • Test pinning on every protocol version and backend. Supply a pinned public key that does not match the server's key over HTTP/3, and proxy mobile app traffic with a self-signed certificate, then check whether the connection succeeds.

Start here: a reading path

Open the path

Clear reports in order, easiest first.

Guides and techniques

View all

The best explainers, cheat sheets and technique posts on Crypto, from around the web.

Newest reports

All 993

Most recently disclosed.

New Crypto reports by email

Follow Crypto and get each week's new disclosures in one short email.

Free. New reports for what you follow, weekly by default. One-click unsubscribe. Privacy