swagger-api / swagger-api/swagger-codegen
WS-2021-0170 (High) detected in spring-core-4.1.6.RELEASE.jar
Nobody has claimed this yet.
- Dominant language
- Mustache
- Stars
- 17.8k
- Forks
- 6k
- PR merge metrics
- No merged PRs in 30d
Description
WS-2021-0170 - High Severity Vulnerability
Vulnerable Library - spring-core-4.1.6.RELEASE.jar
Spring Core
Library home page: https://github.com/spring-projects/spring-framework
Path to dependency file: /samples/client/petstore/java/retrofit2-play24/build.gradle
Path to vulnerable library: /home/wss-scanner/.gradle/caches/modules-2/files-2.1/org.springframework/spring-core/4.1.6.RELEASE/e2f486124d5dea2d91a9c2ea7d4456bc343ca2cc/spring-core-4.1.6.RELEASE.jar
Dependency Hierarchy:
- play-java-ws_2.11-2.4.11.jar (Root Library)
- play-java_2.11-2.4.11.jar
- ❌ spring-core-4.1.6.RELEASE.jar (Vulnerable Library)
- play-java_2.11-2.4.11.jar
Found in HEAD commit: 4b7a8d7d7384aa6a27d6309c35ade0916edae7ed
Found in base branches: 3.0.0, master
Vulnerability Details
In spring-core, versions v4.0.0.RC1 through v4.1.8.RELEASE, and v4.2.0.RC1 through v4.2.2.RELEASE, allow arbitrary code execution due to the SerializableTypeWrapper class, which allows invocation of any method on the Java classpath through its MethodInvokeTypeProvider method. SerializableTypeWrapper, implementing the Serializable interface, can be included in a maliciously crafted serialized object and be used to eventually invoke Runtime.getRuntime.exec(), if commons-collections is included in the classpath.
Publish Date: 2021-06-29
URL: WS-2021-0170
CVSS 3 Score Details (9.0)
Base Score Metrics:
- Exploitability Metrics:
- Attack Vector: Network
- Attack Complexity: High
- Privileges Required: None
- User Interaction: None
- Scope: Changed
- Impact Metrics:
- Confidentiality Impact: High
- Integrity Impact: High
- Availability Impact: High
Suggested Fix
Type: Upgrade version
Release Date: 2021-06-29
Fix Resolution (org.springframework:spring-core): 4.1.9.RELEASE
Direct dependency fix Resolution (com.typesafe.play:play-java-ws_2.11): 2.5.0
- Check this box to open an automated fix PR
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start with samples/client/petstore/java/retrofit2-play24/build.gradle and inspect how play-java-ws_2.11 brings in spring-core 4.1.6.RELEASE. Compare the dependency hierarchy with the suggested spring-core 4.1.9.RELEASE or play-java-ws_2.11 2.5.0 resolution. Done means the vulnerable version is no longer pulled into the sample dependency tree.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- java, spring
- Domain
- build-system, security
- Issue type
- Bug
- Difficulty
- 2/5
- Estimated time
- 1-3 hours
- Activity status
- Stale
- Clarity
- Clearly specified
- Newbie friendliness
- 35/100