How to fix: RSA Key Size Below 2048 Bits
The TLS certificate uses an RSA key smaller than 2048 bits. Keys below this threshold are practically factorable with modern compute resources.
Why it matters
An RSA key below 1024 bits can be factored offline. Keys between 1024 and 2048 bits are at risk from well-resourced attackers, allowing session decryption and impersonation.
Modern TLS certs should use RSA 2048 bits minimum; 3072 is recommended for certificates with long validity windows. Keys below 2048 bits are considered cryptographically weak by NIST and will be rejected by strict verifiers.
How to fix it
- 1Reissue the certificate with RSA 2048 or 3072 bits.
- 2Consider switching to ECDSA P-256 for equivalent security with smaller keys.
Code examples
Generate RSA 3072 CSR
openssl req -newkey rsa:3072 -keyout server.key -out server.csr -nodes -subj '/CN=example.com'Generate ECDSA P-256 CSR
openssl ecparam -genkey -name prime256v1 -out server.key
openssl req -new -key server.key -out server.csr -subj '/CN=example.com'References
Detected automatically by VulnRadar. The check id is tls-cert-key-size-rsa, stable across every scan so you can filter or diff on it.
More tls checks
Questions
- How severe is RSA Key Size Below 2048 Bits?
- 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-key-size-rsa, which stays the same between runs so you can filter, diff, or gate CI on it.
- Which standards does RSA Key Size Below 2048 Bits map to?
- It maps to CWE-326. 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.