Skip to main content
HighTLSOWASP A02:2021CWE-327

How to fix: Certificate signed with a broken hash algorithm

A certificate in the chain the server presents is signed with SHA-1, MD5, MD2, or an ECDSA/DSA variant of SHA-1. The scan reads the signature algorithm OID out of the DER of each certificate the server sent, skipping the self-signed root.

Why it matters

A signature over a broken hash can be moved onto a different certificate, because an attacker can construct a second input with the same digest. A forged certificate carrying a genuine CA signature defeats the entire chain of trust, and any client that still accepts the algorithm accepts the forgery without a warning.

Public CAs stopped issuing SHA-1 TLS certificates in 2016 and browsers stopped trusting them in 2017, so a chain still carrying one is a private CA, a very old certificate, or an intermediate that was never rotated. The root's own self-signature is deliberately excluded: a root is trusted by identity rather than by its signature, so SHA-1 there is not a finding.

How to fix it

  1. 1Reissue the leaf from a CA that signs with SHA-256 or better, and install the full modern chain.
  2. 2For a private CA, re-sign the intermediate and leaf with SHA-256 and redistribute the root to clients.
  3. 3Check every intermediate the server sends, not only the leaf: a modern leaf under a SHA-1 intermediate is still a broken chain.

Code examples

Read the algorithm of every certificate served

bash
openssl s_client -connect example.com:443 -showcerts </dev/null 2>/dev/null \
  | awk '/BEGIN CERT/,/END CERT/' \
  | openssl x509 -noout -subject -issuer -text 2>/dev/null \
  | grep -i "signature algorithm"

Private CA: sign with SHA-256

bash
openssl x509 -req -in server.csr -CA ca.crt -CAkey ca.key \
  -CAcreateserial -out server.crt -days 397 -sha256

References

Detected automatically by VulnRadar. The check id is tls-cert-signature-algorithm-weak, stable across every scan so you can filter or diff on it.

See every tls check

Questions

How severe is Certificate signed with a broken hash algorithm?
VulnRadar rates this high severity in the tls category. The severity is fixed per check, not scored per site, so the same finding is the same severity on every scan.
Does VulnRadar check for this automatically?
Yes. It runs as part of every scan under the check id tls-cert-signature-algorithm-weak, which stays the same between runs so you can filter, diff, or gate CI on it.
Which standards does Certificate signed with a broken hash algorithm map to?
It maps to CWE-327. In the OWASP Top 10 it falls under A02:2021.

Missing a check?

The detection set is open. If you know a misconfiguration this does not catch, propose it: the issue template asks for the threat model, how to detect it, the false-positive risk, and a test fixture, which is the same thing a maintainer would have to work out anyway.

Propose a checkHow a check is built

Scan your own site for certificate signed with a broken hash algorithm

VulnRadar runs this check and hundreds more against a URL in seconds. No agent to install, just paste a URL.

Or scan this site as a demoRead the docs

Certificate signed with a broken hash algorithm | VulnRadar