Skip to content

Backport fix for CWE-862 to 5.4 #10878

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
strowk opened this issue Feb 21, 2022 · 7 comments
Closed

Backport fix for CWE-862 to 5.4 #10878

strowk opened this issue Feb 21, 2022 · 7 comments
Assignees
Labels
status: blocked An issue that's blocked on an external project change

Comments

@strowk
Copy link

strowk commented Feb 21, 2022

Expected Behavior

I would like if minor version 5.4 was available, which does not fail security analysis tools. Currently CWE-862 seems to not be fixed earlier than 5.6, but unfortunately we are unable to migrate to Spring Boot 5.5 at the moment.

These ones seem to be related:
#9931
#9795

Current Behavior

./gradlew dependencyCheckAnalyze fails with following error:

spring-security-core-5.4.9.jar (pkg:maven/org.springframework.security/[email protected], cpe:2.3:a:pivotal_sof
tware:spring_security:5.4.9:*:*:*:*:*:*:*) : CWE-862: Missing Authorization

Context

We are not able to build our project anymore because of this security problem.

@strowk strowk added status: waiting-for-triage An issue we've not yet triaged type: enhancement A general enhancement labels Feb 21, 2022
@strowk
Copy link
Author

strowk commented Feb 21, 2022

Any hope at looking in this soon?

@eleftherias eleftherias self-assigned this Feb 21, 2022
@eleftherias
Copy link
Contributor

@strowk Are you are using this dependency for your analysis? https://github.com/jeremylong/DependencyCheck
If so, there may be some false positives of CWE-862 reported for Spring Security, for example jeremylong/DependencyCheck#4099

At the moment it's not clear to me why the tool would report this problem.
If you have any additional insight feel free to share it.

Note that Spring Security does have a 5.4.10 release available.
This is the last planned release for the 5.4.x branch according to our support policy.

Do you get the same warning if you upgrade to 5.4.10?

@eleftherias eleftherias added status: waiting-for-feedback We need additional information before we can continue and removed status: waiting-for-triage An issue we've not yet triaged type: enhancement A general enhancement labels Feb 21, 2022
@aikebah
Copy link

aikebah commented Feb 21, 2022

@strowk Are you are using this dependency for your analysis? https://github.com/jeremylong/DependencyCheck If so, there may be some false positives of CWE-862 reported for Spring Security, for example jeremylong/DependencyCheck#4099

At the moment it's not clear to me why the tool would report this problem. If you have any additional insight feel free to share it.

As to the why: that's because Sonatype's OSSINDEX reports it for the maven coordinates of the library (https://ossindex.sonatype.org/vulnerability/b2d59cf3-c3d9-4d25-af38-59224eb99ce1?component-type=maven&component-name=org.springframework.security.spring-security-core&utm_source=dependency-check&utm_medium=integration&utm_content=6.5.3)

@spring-projects-issues spring-projects-issues added status: feedback-provided Feedback has been provided and removed status: waiting-for-feedback We need additional information before we can continue labels Feb 21, 2022
@ipaulbogdan
Copy link

ipaulbogdan commented Feb 22, 2022

@eleftherias
Same warning for 5.5.4

@lkratochvil
Copy link

@eleftherias
Copy link
Contributor

I believe this vulnerability was created by mistake.
I have reported it to OSSINDEX in this issue OSSIndex/vulns#249

At this time we don't intend to backport gh-9795 because we do not believe it to be a vulnerability.

@eleftherias eleftherias added status: blocked An issue that's blocked on an external project change and removed status: feedback-provided Feedback has been provided labels Feb 22, 2022
@strowk
Copy link
Author

strowk commented Feb 23, 2022

@eleftherias , yeah, we do use that tool.

Ok, I see that the problem is in the wrong security analysis.

FYI if you wanna suppress this and are using same tool, following suppression is autogenerated from report page (but works only if you have at least xsd 1.3 in xmlns of your suppressions.xml) :

    <suppress>
        <notes><![CDATA[
   file name: spring-security-core-5.4.9.jar
   ]]></notes>
        <packageUrl regex="true">^pkg:maven/org\.springframework\.security/spring\-security\-core@.*$</packageUrl>
        <vulnerabilityName>CWE-862: Missing Authorization</vulnerabilityName>
    </suppress>

Not sure if this is best thing, but probably better than being stuck on this.

I don't see necessity in this ticket, since no work appears to be planned

@strowk strowk closed this as completed Feb 23, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
status: blocked An issue that's blocked on an external project change
Projects
None yet
Development

No branches or pull requests

6 participants