Skip to content
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

Dependency org.springframework.security:spring-security-core, leading to CVE problem #50

Open
CVEDetect opened this issue Nov 7, 2022 · 1 comment

Comments

@CVEDetect
Copy link

Hi, there is a dependency org.springframework.security:spring-security-core:5.1.6.RELEASE that calls the risk method.

CVE-2020-5408

The scope of this CVE affected version is [5.3.0.RELEASE, 5.3.2.RELEASE),[5.2.0.RELEASE, 5.2.4.RELEASE),[5.1.0.RELEASE, 5.1.10.RELEASE),[5.0.0.RELEASE, 5.0.16.RELEASE),[4.2.0.RELEASE, 4.2.16.RELEASE)

After further analysis, in this project, the main Api called is org.springframework.security.crypto.bcrypt.BCryptPasswordEncoder: matches(java.lang.CharSequence,java.lang.String)

Risk method repair link : GitHub

CVE Bug Invocation Path--

Path Length : 2

com.perye.dokit.controller.UserController:updatePass(com.perye.dokit.vo.UserPassVo)Lorg.springframework.http.ResponseEntity; .m2/repository/org/hibernate/hibernate-core/5.3.12.Final/hibernate-core-5.3.12.Final.jar
org.springframework.security.crypto.bcrypt.BCryptPasswordEncoder: matches(java.lang.CharSequence,java.lang.String)

Dependency tree--

[INFO] com.perye:dokit:jar:1.0
[INFO] +- org.springframework.boot:spring-boot-starter:jar:2.1.9.RELEASE:compile
[INFO] |  +- org.springframework.boot:spring-boot:jar:2.1.9.RELEASE:compile
[INFO] |  |  \- org.springframework:spring-context:jar:5.1.10.RELEASE:compile
[INFO] |  +- org.springframework.boot:spring-boot-autoconfigure:jar:2.1.9.RELEASE:compile
[INFO] |  +- org.springframework.boot:spring-boot-starter-logging:jar:2.1.9.RELEASE:compile
[INFO] |  |  +- ch.qos.logback:logback-classic:jar:1.2.3:compile
[INFO] |  |  |  \- ch.qos.logback:logback-core:jar:1.2.3:compile
[INFO] |  |  +- org.apache.logging.log4j:log4j-to-slf4j:jar:2.11.2:compile
[INFO] |  |  |  \- org.apache.logging.log4j:log4j-api:jar:2.11.2:compile
[INFO] |  |  \- org.slf4j:jul-to-slf4j:jar:1.7.28:compile
[INFO] |  +- javax.annotation:javax.annotation-api:jar:1.3.2:compile
[INFO] |  +- org.springframework:spring-core:jar:5.1.10.RELEASE:compile
[INFO] |  |  \- org.springframework:spring-jcl:jar:5.1.10.RELEASE:compile
[INFO] |  \- org.yaml:snakeyaml:jar:1.23:runtime
[INFO] +- org.springframework.boot:spring-boot-starter-data-jpa:jar:2.1.9.RELEASE:compile
[INFO] |  +- org.springframework.boot:spring-boot-starter-aop:jar:2.1.9.RELEASE:compile
[INFO] |  |  \- org.aspectj:aspectjweaver:jar:1.9.4:compile
[INFO] |  +- org.springframework.boot:spring-boot-starter-jdbc:jar:2.1.9.RELEASE:compile
[INFO] |  |  +- com.zaxxer:HikariCP:jar:3.2.0:compile
[INFO] |  |  \- org.springframework:spring-jdbc:jar:5.1.10.RELEASE:compile
[INFO] |  +- javax.transaction:javax.transaction-api:jar:1.3:compile
[INFO] |  +- javax.xml.bind:jaxb-api:jar:2.3.1:compile
[INFO] |  |  \- javax.activation:javax.activation-api:jar:1.2.0:compile
[INFO] |  +- org.hibernate:hibernate-core:jar:5.3.12.Final:compile
[INFO] |  |  +- org.jboss.logging:jboss-logging:jar:3.3.3.Final:compile
[INFO] |  |  +- javax.persistence:javax.persistence-api:jar:2.2:compile
[INFO] |  |  +- org.javassist:javassist:jar:3.23.2-GA:compile
[INFO] |  |  +- net.bytebuddy:byte-buddy:jar:1.9.16:compile
[INFO] |  |  +- antlr:antlr:jar:2.7.7:compile
[INFO] |  |  +- org.jboss:jandex:jar:2.0.5.Final:compile
[INFO] |  |  +- org.dom4j:dom4j:jar:2.1.1:compile
[INFO] |  |  +- org.hibernate.common:hibernate-commons-annotations:jar:5.0.4.Final:compile
[INFO] |  |  \- org.glassfish.jaxb:jaxb-runtime:jar:2.3.1:compile
[INFO] |  |     +- org.glassfish.jaxb:txw2:jar:2.3.1:compile
[INFO] |  |     +- com.sun.istack:istack-commons-runtime:jar:3.0.7:compile
[INFO] |  |     +- org.jvnet.staxex:stax-ex:jar:1.8:compile
[INFO] |  |     \- com.sun.xml.fastinfoset:FastInfoset:jar:1.2.15:compile
[INFO] |  +- org.springframework.data:spring-data-jpa:jar:2.1.11.RELEASE:compile
[INFO] |  |  +- org.springframework.data:spring-data-commons:jar:2.1.11.RELEASE:compile
[INFO] |  |  +- org.springframework:spring-orm:jar:5.1.10.RELEASE:compile
[INFO] |  |  +- org.springframework:spring-tx:jar:5.1.10.RELEASE:compile
[INFO] |  |  \- org.springframework:spring-beans:jar:5.1.10.RELEASE:compile
[INFO] |  \- org.springframework:spring-aspects:jar:5.1.10.RELEASE:compile
[INFO] +- org.springframework.boot:spring-boot-starter-web:jar:2.1.9.RELEASE:compile
[INFO] |  +- org.springframework.boot:spring-boot-starter-json:jar:2.1.9.RELEASE:compile
[INFO] |  |  +- com.fasterxml.jackson.datatype:jackson-datatype-jdk8:jar:2.9.9:compile
[INFO] |  |  +- com.fasterxml.jackson.datatype:jackson-datatype-jsr310:jar:2.9.9:compile
[INFO] |  |  \- com.fasterxml.jackson.module:jackson-module-parameter-names:jar:2.9.9:compile
[INFO] |  +- org.springframework.boot:spring-boot-starter-tomcat:jar:2.1.9.RELEASE:compile
[INFO] |  |  +- org.apache.tomcat.embed:tomcat-embed-core:jar:9.0.26:compile
[INFO] |  |  +- org.apache.tomcat.embed:tomcat-embed-el:jar:9.0.26:compile
[INFO] |  |  \- org.apache.tomcat.embed:tomcat-embed-websocket:jar:9.0.26:compile
[INFO] |  +- org.hibernate.validator:hibernate-validator:jar:6.0.17.Final:compile
[INFO] |  |  \- javax.validation:validation-api:jar:2.0.1.Final:compile
[INFO] |  +- org.springframework:spring-web:jar:5.1.10.RELEASE:compile
[INFO] |  \- org.springframework:spring-webmvc:jar:5.1.10.RELEASE:compile
[INFO] |     \- org.springframework:spring-expression:jar:5.1.10.RELEASE:compile
[INFO] +- org.springframework.boot:spring-boot-starter-security:jar:2.1.9.RELEASE:compile
[INFO] |  +- org.springframework:spring-aop:jar:5.1.10.RELEASE:compile
[INFO] |  +- org.springframework.security:spring-security-config:jar:5.1.6.RELEASE:compile
[INFO] |  |  \- org.springframework.security:spring-security-core:jar:5.1.6.RELEASE:compile
[INFO] |  \- org.springframework.security:spring-security-web:jar:5.1.6.RELEASE:compile
[INFO] +- org.springframework.boot:spring-boot-starter-cache:jar:2.1.9.RELEASE:compile
[INFO] |  \- org.springframework:spring-context-support:jar:5.1.10.RELEASE:compile
[INFO] +- org.springframework.boot:spring-boot-starter-data-redis:jar:2.1.9.RELEASE:compile
[INFO] |  +- org.springframework.data:spring-data-redis:jar:2.1.11.RELEASE:compile
[INFO] |  |  +- org.springframework.data:spring-data-keyvalue:jar:2.1.11.RELEASE:compile
[INFO] |  |  \- org.springframework:spring-oxm:jar:5.1.10.RELEASE:compile
[INFO] |  \- io.lettuce:lettuce-core:jar:5.1.8.RELEASE:compile
[INFO] |     +- io.netty:netty-common:jar:4.1.39.Final:compile
[INFO] |     +- io.netty:netty-handler:jar:4.1.39.Final:compile
[INFO] |     |  +- io.netty:netty-buffer:jar:4.1.39.Final:compile
[INFO] |     |  \- io.netty:netty-codec:jar:4.1.39.Final:compile
[INFO] |     +- io.netty:netty-transport:jar:4.1.39.Final:compile
[INFO] |     |  \- io.netty:netty-resolver:jar:4.1.39.Final:compile
[INFO] |     \- io.projectreactor:reactor-core:jar:3.2.12.RELEASE:compile
[INFO] |        \- org.reactivestreams:reactive-streams:jar:1.0.3:compile
[INFO] +- org.apache.commons:commons-pool2:jar:2.5.0:compile
[INFO] +- org.apache.commons:commons-lang3:jar:3.8.1:compile
[INFO] +- org.bgee.log4jdbc-log4j2:log4jdbc-log4j2-jdbc4.1:jar:1.16:compile
[INFO] +- io.springfox:springfox-swagger2:jar:2.9.2:compile
[INFO] |  +- io.springfox:springfox-spi:jar:2.9.2:compile
[INFO] |  |  \- io.springfox:springfox-core:jar:2.9.2:compile
[INFO] |  +- io.springfox:springfox-schema:jar:2.9.2:compile
[INFO] |  +- io.springfox:springfox-swagger-common:jar:2.9.2:compile
[INFO] |  +- io.springfox:springfox-spring-web:jar:2.9.2:compile
[INFO] |  +- com.google.guava:guava:jar:20.0:compile
[INFO] |  +- com.fasterxml:classmate:jar:1.4.0:compile
[INFO] |  +- org.slf4j:slf4j-api:jar:1.7.28:compile
[INFO] |  +- org.springframework.plugin:spring-plugin-core:jar:1.2.0.RELEASE:compile
[INFO] |  \- org.springframework.plugin:spring-plugin-metadata:jar:1.2.0.RELEASE:compile
[INFO] +- io.springfox:springfox-swagger-ui:jar:2.9.2:compile
[INFO] +- io.swagger:swagger-annotations:jar:1.5.21:compile
[INFO] +- io.swagger:swagger-models:jar:1.5.21:compile
[INFO] |  \- com.fasterxml.jackson.core:jackson-annotations:jar:2.9.0:compile
[INFO] +- mysql:mysql-connector-java:jar:8.0.17:runtime
[INFO] +- com.alibaba:druid-spring-boot-starter:jar:1.1.22:compile
[INFO] |  \- com.alibaba:druid:jar:1.1.22:compile
[INFO] +- org.lionsoul:ip2region:jar:1.7.2:compile
[INFO] +- org.projectlombok:lombok:jar:1.18.10:compile (optional) 
[INFO] +- cn.hutool:hutool-all:jar:5.3.4:compile
[INFO] +- org.apache.poi:poi:jar:3.17:compile
[INFO] |  +- commons-codec:commons-codec:jar:1.11:compile
[INFO] |  \- org.apache.commons:commons-collections4:jar:4.1:compile
[INFO] +- org.apache.poi:poi-ooxml:jar:3.17:compile
[INFO] |  +- org.apache.poi:poi-ooxml-schemas:jar:3.17:compile
[INFO] |  |  \- org.apache.xmlbeans:xmlbeans:jar:2.6.0:compile
[INFO] |  |     \- stax:stax-api:jar:1.0.1:compile
[INFO] |  \- com.github.virtuald:curvesapi:jar:1.04:compile
[INFO] +- xerces:xercesImpl:jar:2.12.2:compile
[INFO] |  \- xml-apis:xml-apis:jar:1.4.01:compile
[INFO] +- com.alibaba:fastjson:jar:1.2.70:compile
[INFO] +- org.mapstruct:mapstruct:jar:1.3.1.Final:compile
[INFO] +- org.mapstruct:mapstruct-processor:jar:1.3.1.Final:provided
[INFO] +- javax.inject:javax.inject:jar:1:compile
[INFO] +- io.jsonwebtoken:jjwt-api:jar:0.11.1:compile
[INFO] +- io.jsonwebtoken:jjwt-impl:jar:0.11.1:compile
[INFO] +- io.jsonwebtoken:jjwt-jackson:jar:0.11.1:compile
[INFO] |  \- com.fasterxml.jackson.core:jackson-databind:jar:2.9.9.3:compile
[INFO] |     \- com.fasterxml.jackson.core:jackson-core:jar:2.9.9:compile
[INFO] +- org.quartz-scheduler:quartz:jar:2.3.1:compile
[INFO] |  \- com.mchange:mchange-commons-java:jar:0.2.15:compile
[INFO] +- org.springframework.boot:spring-boot-starter-freemarker:jar:2.1.9.RELEASE:compile
[INFO] |  \- org.freemarker:freemarker:jar:2.3.29:compile
[INFO] +- commons-configuration:commons-configuration:jar:1.9:compile
[INFO] |  +- commons-lang:commons-lang:jar:2.6:compile
[INFO] |  \- commons-logging:commons-logging:jar:1.1.1:compile
[INFO] +- javax.mail:mail:jar:1.5.0-b01:compile
[INFO] |  \- javax.activation:activation:jar:1.1:compile
[INFO] +- com.qiniu:qiniu-java-sdk:jar:7.2.29:compile
[INFO] |  +- com.squareup.okhttp3:okhttp:jar:3.14.4:runtime
[INFO] |  |  \- com.squareup.okio:okio:jar:1.17.2:runtime
[INFO] |  \- com.google.code.gson:gson:jar:2.8.5:runtime
[INFO] +- org.springframework.boot:spring-boot-starter-test:jar:2.1.9.RELEASE:test
[INFO] |  +- org.springframework.boot:spring-boot-test:jar:2.1.9.RELEASE:test
[INFO] |  +- org.springframework.boot:spring-boot-test-autoconfigure:jar:2.1.9.RELEASE:test
[INFO] |  +- com.jayway.jsonpath:json-path:jar:2.4.0:test
[INFO] |  |  \- net.minidev:json-smart:jar:2.3:test
[INFO] |  |     \- net.minidev:accessors-smart:jar:1.2:test
[INFO] |  |        \- org.ow2.asm:asm:jar:5.0.4:test
[INFO] |  +- junit:junit:jar:4.12:test
[INFO] |  +- org.assertj:assertj-core:jar:3.11.1:test
[INFO] |  +- org.mockito:mockito-core:jar:2.23.4:test
[INFO] |  |  +- net.bytebuddy:byte-buddy-agent:jar:1.9.16:test
[INFO] |  |  \- org.objenesis:objenesis:jar:2.6:test
[INFO] |  +- org.hamcrest:hamcrest-core:jar:1.3:test
[INFO] |  +- org.hamcrest:hamcrest-library:jar:1.3:test
[INFO] |  +- org.skyscreamer:jsonassert:jar:1.5.0:test
[INFO] |  |  \- com.vaadin.external.google:android-json:jar:0.0.20131108.vaadin1:test
[INFO] |  +- org.springframework:spring-test:jar:5.1.10.RELEASE:test
[INFO] |  \- org.xmlunit:xmlunit-core:jar:2.6.3:test
[INFO] +- com.github.whvcse:easy-captcha:jar:1.6.2:compile
[INFO] +- eu.bitwalker:UserAgentUtils:jar:1.21:compile
[INFO] +- org.springframework.boot:spring-boot-starter-websocket:jar:2.1.9.RELEASE:compile
[INFO] |  +- org.springframework:spring-messaging:jar:5.1.10.RELEASE:compile
[INFO] |  \- org.springframework:spring-websocket:jar:5.1.10.RELEASE:compile
[INFO] +- ch.ethz.ganymed:ganymed-ssh2:jar:build210:compile
[INFO] +- com.jcraft:jsch:jar:0.1.55:compile
[INFO] +- commons-io:commons-io:jar:2.7:compile
[INFO] \- com.github.oshi:oshi-core:jar:5.0.1:compile
[INFO]    +- net.java.dev.jna:jna:jar:5.5.0:compile
[INFO]    \- net.java.dev.jna:jna-platform:jar:5.5.0:compile

Suggested solutions:

Update dependency version

Thank you very much.

@perye
Copy link
Owner

perye commented Nov 7, 2022 via email

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants