Skip to content

Sonatype vulnerability CVE-2020-5408 in spring-security-crypto #28934

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
pcc-gambhp opened this issue Aug 8, 2022 · 6 comments
Closed

Sonatype vulnerability CVE-2020-5408 in spring-security-crypto #28934

pcc-gambhp opened this issue Aug 8, 2022 · 6 comments
Labels
status: invalid An issue that we don't feel is valid

Comments

@pcc-gambhp
Copy link

pcc-gambhp commented Aug 8, 2022

Affects: \5.3.3. RELEASE
Issue Title : Sonatype vulnerability CVE-2020-5408 in spring-security-crypto

Issue-:Sonatype vulnerability CVE-2020-5408 in spring-security-crypto

Description
Description from CVE
Spring Security versions 5.3.x prior to 5.3.2, 5.2.x prior to 5.2.4, 5.1.x prior to 5.1.10, 5.0.x prior to 5.0.16 and 4.2.x prior to 4.2.16 use a fixed null initialization vector with CBC Mode in the implementation of the queryable text encryptor. A malicious user with access to the data that has been encrypted using such an encryptor may be able to derive the unencrypted values using a dictionary attack.

Explanation
The spring-security-crypto package, also known as Spring Security Crypto Module, is vulnerable due to Not Using a Random IV with CBC Mode. The queryableText method in Encryptors.class which serves as the queryable text encryptor, utilises a fixed null initialization vector with CBC mode, which is not secure. An attacker can exploit this vulnerability via Dictionary Attacks to potentially derive unencrypted values of data encrypted using this method.

Advisory Deviation Notice: The Sonatype security research team discovered that this issue is not yet fixed as new versions simply @deprecated the vulnerable method, as mentioned in the advisory as opposed to replacing it with a safe alternative. Therefore, these are still flagged as vulnerable.

Detection
The application is vulnerable by using this component, if it uses queryableText(CharSequence, CharSequence) in Encryptors.class for querying encrypted data.

Recommendation
There is no non-vulnerable upgrade path for this component/package. We recommend investigating alternative components or a potential mitigating control.

NOTE: In the "fixed versions" released by Spring, the vulnerable queryableText encryptor has simply been @deprecated instead of being replaced with a safer option. Therefore, these are still flagged as vulnerable. Whether using a "fixed version" or not,

The note also includes-:
All users should discontinue the use of Encryptors#queryableText(CharSequence, CharSequence) and rely on their data store for querying encrypted data.

Reference: https://tanzu.vmware.com/security/cve-2020-5408

Root Cause
spring-security-crypto-5.3.3.RELEASE.jarorg/springframework/security/crypto/encrypt/Encryptors.class( , )
Advisories
Projecthttps://github.com/spring-projects/spring-security/issues/8480
Projecthttps://spring.io/blog/2020/05/13/cve-reports-published-for-spring-security
Projecthttps://tanzu.vmware.com/security/cve-2020-5408
CVSS Details
CVE CVSS 36.5
CVSS VectorCVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:H/I:N/A:N

@spring-projects-issues spring-projects-issues added the status: waiting-for-triage An issue we've not yet triaged or decided on label Aug 8, 2022
@bclozel
Copy link
Member

bclozel commented Aug 8, 2022

What is the purpose of this issue? You've copied a Spring Security CVE advisory but failed to explain the problem.

I'm closing this as invalid.

@bclozel bclozel added status: invalid An issue that we don't feel is valid and removed status: waiting-for-triage An issue we've not yet triaged or decided on labels Aug 8, 2022
@bclozel bclozel closed this as not planned Won't fix, can't repro, duplicate, stale Aug 8, 2022
@pcc-gambhp
Copy link
Author

Can you please see the issue. I have take the format from #24434

@snicoll
Copy link
Member

snicoll commented Aug 8, 2022

@pulkitpcc except the CVE is about Spring Security and you've copy/pasted the title that states it's related to Spring Web. Whatever you're suggesting is in the wrong issue tracker as well.

@pcc-gambhp pcc-gambhp changed the title Sonatype vulnerability CVE-2020-5408 in Spring-web project Sonatype vulnerability CVE-2020-5408 in spring-security-crypto Aug 8, 2022
@pcc-gambhp
Copy link
Author

pcc-gambhp commented Aug 8, 2022

@pulkitpcc except the CVE is about Spring Security and you've copy/pasted the title that states it's related to Spring Web. Whatever you're suggesting is in the wrong issue tracker as well.

@snicoll I have updated the title accordingly.

@bclozel
Copy link
Member

bclozel commented Aug 8, 2022

@pulkitpcc Spring Framework doesn't depend on Spring Security so there's nothing we can do about this here.

If you have questions about this CVE you should read the official advisory (mitigation section) or ask a question on StackOverlow.

@pcc-gambhp
Copy link
Author

@pulkitpcc Spring Framework doesn't depend on Spring Security so there's nothing we can do about this here.

If you have questions about this CVE you should read the official advisory (mitigation section) or ask a question on StackOverlow.

Thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
status: invalid An issue that we don't feel is valid
Projects
None yet
Development

No branches or pull requests

4 participants