CWE-780: Use of RSA Algorithm without OAEP
The product uses the RSA algorithm but does not incorporate Optimal Asymmetric Encryption Padding (OAEP), which might weaken the encryption.
How it's found
Use of RSA Algorithm without OAEP is a specific, narrowly defined instance of a broader pattern. Testers confirm it with targeted code review and a proof-of-concept input that exercises the exact code path this weakness describes.
Padding schemes are often used with cryptographic algorithms to make the plaintext less predictable and complicate attack efforts. The OAEP scheme is often used with RSA to nullify the impact of predictable common text.
Vulnerable vs. safe
rsa = javax.crypto.Cipher.getInstance("RSA/NONE/NoPadding");
log("this should never happen", e);
log("this should never happen", e);Cipher rsa = null;try {}catch (java.security.NoSuchAlgorithmException e) {}catch (javax.crypto.NoSuchPaddingException e) {}return rsa;public Cipher getRSACipher() {}rsa = javax.crypto.Cipher.getInstance("RSA/ECB/OAEPWithMD5AndMGF1Padding");
log("this should never happen", e);
log("this should never happen", e);Cipher rsa = null;try {}catch (java.security.NoSuchAlgorithmException e) {}catch (javax.crypto.NoSuchPaddingException e) {}return rsa;public Cipher getRSACipher() {}Consequences
- Bypass Protection Mechanism: Without OAEP in RSA encryption, it will take less work for an attacker to decrypt the data or to infer patterns from the ciphertext.
Where this fits in a TurboPentest engagement
This weakness is not covered by the automated black-box pentest. IntegSec pentesters cover it in a manual engagement.
Frequently asked questions
What is CWE-780?
The product uses the RSA algorithm but does not incorporate Optimal Asymmetric Encryption Padding (OAEP), which might weaken the encryption.
How do you find Use of RSA Algorithm without OAEP?
Use of RSA Algorithm without OAEP is a specific, narrowly defined instance of a broader pattern. Testers confirm it with targeted code review and a proof-of-concept input that exercises the exact code path this weakness describes.
What is the impact of CWE-780?
Bypass Protection Mechanism: Without OAEP in RSA encryption, it will take less work for an attacker to decrypt the data or to infer patterns from the ciphertext.
Does TurboPentest test for Use of RSA Algorithm without OAEP?
This weakness is not covered by the automated black-box pentest. IntegSec pentesters cover it in a manual engagement.
Related CWEs
Written and reviewed by
Michel Chamberland - Founder & CEO, IntegSec
CISSP, OSCP, OSCE, CEH, GIAC, CCSK · 20+ years in offensive security
Michel has spent 20+ years on offensive security teams including IBM X-Force Red and Trustwave SpiderLabs, leading penetration tests, red team engagements, and breach response for Fortune 500 customers. He is the founder of IntegSec and the architect of TurboPentest.
Find these issues before an attacker does
TurboPentest runs an agentic AI pentest against your target and reports findings with proof, from $99 per target.
Start a pentest