CVE-2022-36944
Scala subject to file deletion, code execution due to Java deserialization chain with LazyList object deserialization
Description
Scala 2.13.x before 2.13.9 has a Java deserialization chain in its JAR file. On its own, it cannot be exploited. There is only a risk in conjunction with LazyList object deserialization within an application. In such situations, it allows attackers to erase contents of arbitrary files, make network connections, or possibly run arbitrary code (specifically, Function0 functions) via a gadget chain.
Affected Maven artifacts (1)
| Artifact | Affected versions | Fixed in |
|---|---|---|
| org.scala-lang » scala-library | >= 2.13.0, < 2.13.9 | 2.13.9 |
Blast radius
43% of the dependent artifacts (5,961) still pull an affected version in their latest release.
| Depth | Dependent versions |
|---|---|
| Direct | 189,310 |
| 2 hops | 51,209 |
| 3 hops | 25,145 |
| 4 hops | 11,368 |
| 5 hops | 10,456 |
| 6 hops | 6,495 |
Most used dependents
- org.scalatest » scalatest20,465 usages
- org.scala-lang » scala3-library14,542 usages
- org.scala-js » scalajs-library7,088 usages
- org.scalacheck » scalacheck5,242 usages
- org.scala-lang » scala-reflect4,689 usages
- org.scala-js » scalajs-test-bridge4,640 usages
- net.alchim31.maven » scala-maven-plugin3,328 usages
- org.typelevel » cats-core3,249 usages
- org.apache.spark » spark-sql3,174 usages
- org.scala-js » scalajs-test-interface2,931 usages
- org.scala-lang.modules » scala-collection-compat2,917 usages
- org.scalameta » munit2,497 usages
- org.scoverage » scalac-scoverage-runtime2,440 usages
- org.scala-lang » scala-compiler2,362 usages
- org.scoverage » scalac-scoverage-plugin2,309 usages
Computed from the dependency graph of build 20261124.0621 (compile and runtime scopes, nearest version wins). Exclusions and dependency management in consuming projects are not applied, so dependents are potentially affected. When several artifacts are affected, a dependent version that pulls more than one of them is counted once per artifact.
References
| Advisory | NVD CVE-2022-36944 | nvd.nist.gov |
| Package | scala/scala | github.com |
| Web | scala/scala pull request #10118 | github.com |
| Web | t/impact-of-cve-2022-36944-on-akka-cluster-akka-actor-akka-remote/10007/2 | discuss.lightbend.com |
| Web | scala/scala-collection-compat release v2.9.0 | github.com |
| Web | scala/scala release v2.13.9 | github.com |
| Web | archives/list/package-announce@lists.fedoraproject.org/message/6ZOZVWY3X72FZZCCRAKRJYTQOJ6 ... | lists.fedoraproject.org |
| Web | archives/list/package-announce@lists.fedoraproject.org/message/L3WMKPFAMFQE3HJVRQ5KOJUTWG2 ... | lists.fedoraproject.org |
| Web | download | scala-lang.org |
