TLS Certificate Signed Using a Weak Hashing Algorithm
The service's certificate, or one in its chain, is signed using MD5 or SHA-1, hash algorithms broken by collision attacks, which many current clients reject.
| Severity | Medium |
| CVSS 3.1 | 4.8 CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:L/I:L/A:N Open in the calculator |
| CVSS 4.0 | 6.3 CVSS:4.0/AV:N/AC:H/AT:P/PR:N/UI:N/VC:L/VI:L/VA:N/SC:N/SI:N/SA:N Open in the calculator |
| CWE | CWE-328: Use of Weak Hash |
| OWASP Top 10 | A04:2025 Cryptographic Failures |
| MITRE ATT&CK | T1557 Adversary-in-the-Middle |
| Category | Cryptographic Failures |
Description
A certificate presented by the service, either its own or an intermediate certificate in its chain, carries a signature made with a weak hash algorithm: typically SHA-1 (sha1WithRSAEncryption) or, on very old systems, MD5. Both hash functions are broken by collision attacks. MD5 collisions were used in 2008 to create a rogue CA certificate and later by the Flame malware to forge a code signing certificate; practical SHA-1 collisions were published in 2017 (SHAttered), followed in 2020 by a chosen-prefix collision of the kind needed to forge certificates.
An attacker able to produce a hash collision against a CA that still signs with the weak algorithm could obtain a certificate that appears validly issued for a service they do not control, and use it to intercept that service's traffic without a warning. For SHA-1 this needs a chosen-prefix collision, which is costly and requires the attacker to predict the content of a certificate the CA will sign, so it is beyond most attackers; for MD5 it is far easier.
Publicly trusted CAs stopped issuing SHA-1 certificates years ago, and current browsers and many other clients no longer accept SHA-1 signatures, so the finding is now met mainly on internal CAs that still sign with SHA-1, old self-signed certificates and devices with built-in certificates. In practice the more immediate effect is that those clients reject the certificate, causing warnings that users learn to ignore, or failures that lead administrators to disable verification.
The signature on a root certificate is not a concern, because clients trust a root directly rather than by checking its signature: only the signatures on the server and intermediate certificates matter, and a scanner that flags a SHA-1 root is reporting a false positive. The signature algorithm of each certificate in the chain is shown by testssl.sh, sslscan, openssl x509 -text and vulnerability scanners.
Remediation
Replace any certificate signed with MD5 or SHA-1 by one signed using SHA-256 or stronger (for example sha256WithRSAEncryption or ecdsa-with-SHA256), and correct the issuing CA:
- Reissue the server certificate, and any intermediate CA certificate signed with a weak hash, then install the new chain on every system that uses it.
- For an Active Directory Certificate Services CA still signing with SHA-1, change its hash algorithm to SHA-256 after checking that every client and application relying on the CA supports it. For a CA whose key is held by a CNG key storage provider this is done with
certutil -setreg ca\csp\CNGHashAlgorithm SHA256followed by a restart of the Certificate Services service; a CA using a legacy cryptographic service provider must first be migrated to a key storage provider. - For devices with built-in certificates, install a certificate issued by a current CA, or apply firmware that supports one.
- A trusted root certificate does not need to be replaced because of the hash used in its own self-signature.
Confirm the fix by checking the signature algorithm of each certificate the service presents, apart from the root.
References
Add This Finding to Your Library
In Pental this write-up is in Settings, Library. Add to my library copies it into your own, rated in your firm's CVSS version, ready to put in your own words.
Free trialYour trial starts when your portal goes live, not when you sign up, so the time you spend setting up does not count. · No card required
Only need the reporting? Our reporting tool is free and open source, with the same library.