CVE-2017-15288: Scala compiler Scala-compiler Vulnerability

HIGH
Advisory Identifier: GHSA-qvxv-pmq9-4q7g
CVSS 7.8
CWE-732
Published
Advisory Summary

CVE-2017-15288 is a HIGH (CVSS 7.8) scala-compiler vulnerability (CWE-732: Incorrect Permission Assignment for Critical Resource) affecting Scala compiler libraries in the Maven ecosystem. The issue involves scala-compiler. Remediation is available by upgrading affected packages to version 2.10.7, 2.11.12, 2.12.4.

CVE-2017-15288 at a Glance

CVE Identifier CVE-2017-15288
GHSA Identifier GHSA-qvxv-pmq9-4q7g
Severity HIGH
CVSS v3.1 Base Score 7.8
CWE Classification CWE-732: Incorrect Permission Assignment for Critical Resource
Affected Product Scala compiler
Package Ecosystem Maven
Published Date
Last Updated

Security Impact

CVSS: 7.8

The security impact metrics below are parsed directly from the CVSS v3.1 vector string (CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H).

Attack Vector Local (AV:L)
Attack Complexity Low (AC:L)
Privileges Required Low (PR:L)
User Interaction None (UI:N)
Scope Unchanged (S:U)
Confidentiality High (C:H)
Integrity High (I:H)
Availability High (A:H)

How to Fix CVE-2017-15288

To remediate this vulnerability, upgrade all affected Scala compiler dependencies to a patched release. Both direct and transitive dependencies should be checked, as frameworks or security libraries may pull in vulnerable versions transitively.

org.scala-lang:scala-compiler fixed: 2.10.7
<dependency>
    <groupId>org.scala-lang</groupId>
    <artifactId>scala-compiler</artifactId>
    <version>2.10.7</version>
</dependency>
org.scala-lang:scala-compiler fixed: 2.11.12
<dependency>
    <groupId>org.scala-lang</groupId>
    <artifactId>scala-compiler</artifactId>
    <version>2.11.12</version>
</dependency>
org.scala-lang:scala-compiler fixed: 2.12.4
<dependency>
    <groupId>org.scala-lang</groupId>
    <artifactId>scala-compiler</artifactId>
    <version>2.12.4</version>
</dependency>
Verify Direct and Transitive Dependencies

Run the following command in your project directory to verify that all resolved dependencies use the patched release:

mvn dependency:tree -Dincludes=org.scala-lang

How to Check if You Are Affected

To determine whether your Java application is affected by CVE-2017-15288, inspect your build dependencies using the Maven Dependency Plugin:

mvn dependency:tree -Dincludes=org.scala-lang

Analyze the terminal output to locate any version of Scala compiler in your dependency tree. If any resolved version matches the vulnerable ranges listed in the table below (for example, versions earlier than 2.10.7), your application is affected.

Note: The mvn dependency:tree -Dincludes=org.scala-lang command inspects the resolved dependency graph declared in your project's POM files; it does not perform automated security scanning or inspect runtime dynamic classpaths. Always verify runtime container classpaths and shaded JARs.

Technical Details

Vulnerability Mechanism & Technical Analysis

This vulnerability is classified under CWE-732: Incorrect Permission Assignment for Critical Resource, where the product specifies permissions for a security-critical resource in a way that allows that resource to be read or modified by unintended actors. In Scala compiler, software state validation or input boundaries are circumvented during processing. Review the official source advisory statement below for specific affected components, classes, and reproduction details.

Source Advisory Statement

The compilation daemon in Scala before 2.10.7, 2.11.x before 2.11.12, and 2.12.x before 2.12.4 uses weak permissions for private files in /tmp/scala-devel/${USER:shared}/scalac-compile-server-port, which allows local users to write to arbitrary class files and consequently gain privileges.

CVE-2017-15288 Affected Scala compiler Versions

3 component(s)
Fixed Versions:
2.10.72.11.122.12.4
Product / Package Ecosystem Affected Versions Fixed Version
org.scala-lang:scala-compiler
Maven
< 2.10.7
2.10.7
org.scala-lang:scala-compiler
Maven
≥ 2.11.0
< 2.11.12
2.11.12
org.scala-lang:scala-compiler
Maven
≥ 2.12.0
< 2.12.4
2.12.4

References

NVD — CVE-2017-15288 NVD
https://nvd.nist.gov/vuln/detail/CVE-2017-15288
Scala compiler Source Repository REPOSITORY
https://github.com/scala/scala/pull/6108
Scala compiler Source Repository REPOSITORY
https://github.com/scala/scala/pull/6120
Scala compiler Source Repository REPOSITORY
https://github.com/scala/scala/pull/6128
Scala compiler Security Information SECURITY
https://security.gentoo.org/glsa/201812-08
lists.apache.org/thread.html/rf57e4d... WEB
https://lists.apache.org/thread.html/rf57e4d7211b30e51803911304f3b7b54393f7a4bd60bb0784c31eec1@%3Cjira.kafka.apache.org%3E
lists.apache.org/thread.html/re72f4d... WEB
https://lists.apache.org/thread.html/re72f4d04dfc398aae0e38dbfeccf44780df2782623a610cbfcec6f3a@%3Cjira.kafka.apache.org%3E
lists.apache.org/thread.html/r628ea3... WEB
https://lists.apache.org/thread.html/r628ea3ea2fed4d9c1c5232a0b1ed108a15abc9fd2f0aaca1e8cc9164@%3Cdev.kafka.apache.org%3E
lists.apache.org/thread.html/r5a1418... WEB
https://lists.apache.org/thread.html/r5a1418a4f5101f5af3fc14bf358c54f2c7200e6a3701de2e2f581e1b@%3Cdev.kafka.apache.org%3E
lists.apache.org/thread.html/r3f1002... WEB
https://lists.apache.org/thread.html/r3f10022ec972c8df29a950d1a591c16562eeddd9194d3010e46b9b76@%3Cjira.kafka.apache.org%3E
lists.apache.org/thread.html/r33665e... WEB
https://lists.apache.org/thread.html/r33665e9213cc6df1e48c3d99d1b0c7a3203e9bd0ef4fc4ba838bcb04@%3Cjira.kafka.apache.org%3E
lists.apache.org/thread.html/r32e0b1... WEB
https://lists.apache.org/thread.html/r32e0b1d5ff43ac3ed4b179a4e663022d1c5ccac77884a99ea149e633@%3Ccommits.druid.apache.org%3E
lists.apache.org/thread.html/r1d51ea... WEB
https://lists.apache.org/thread.html/r1d51eae81ceb7bfd1780936a48b460ab31d53ff2ed526a88a7f60fe4@%3Ccommits.druid.apache.org%3E
Scala compiler Source Repository REPOSITORY
https://github.com/scala/scala
lists.apache.org/thread.html/r18a051... WEB
https://lists.apache.org/thread.html/r18a05115cfa078c0f4e5c1ea2e8d64804f63e0095aa2174a3afecc0f@%3Cjira.kafka.apache.org%3E
lists.apache.org/thread.html/r10dd8e... WEB
https://lists.apache.org/thread.html/r10dd8e5b3bbe3bb531aa4a65472ce56f91efbb77ea9fe04bb8272e2c@%3Cjira.kafka.apache.org%3E
lists.apache.org/thread.html/f9bc3e5... WEB
https://lists.apache.org/thread.html/f9bc3e55f4e28d1dcd1a69aae6d53e609a758e34d2869b4d798e13cc@%3Cissues.drill.apache.org%3E
lists.apache.org/thread.html/b0656d3... WEB
https://lists.apache.org/thread.html/b0656d359c7d40ec9f39c8cc61bca66802ef9a2a12ee199f5b0c1442@%3Cdev.drill.apache.org%3E
lists.apache.org/thread.html/519eb0f... WEB
https://lists.apache.org/thread.html/519eb0fd45642dcecd9ff74cb3e71c20a4753f7d82e2f07864b5108f@%3Cdev.drill.apache.org%3E
lists.apache.org/thread.html/053d9ce... WEB
https://lists.apache.org/thread.html/053d9ce4d579b02203db18545fee5e33f35f2932885459b74d1e4272@%3Cissues.activemq.apache.org%3E
GitHub Advisory / Wiki ADVISORY
https://github.com/advisories/GHSA-qvxv-pmq9-4q7g
Scala compiler Security Information SECURITY
http://scala-lang.org/news/security-update-nov17.html

Frequently Asked Questions

What is CVE-2017-15288?
CVE-2017-15288 is a security vulnerability in Scala compiler involving scala-compiler under CWE-732: Incorrect Permission Assignment for Critical Resource.
Which Scala compiler versions are affected?
Affected versions include releases prior to 2.10.7, 2.11.12, 2.12.4 across affected packages: org.scala-lang:scala-compiler.
What version fixes CVE-2017-15288?
Upgrading to 2.10.7, 2.11.12, 2.12.4 (or the latest patched release for your respective branch) resolves the vulnerability.
Is scala-compiler affected?
Yes, org.scala-lang:scala-compiler is affected in releases prior to 2.10.7, 2.11.12, 2.12.4. Upgrade your dependency to 2.10.7, 2.11.12, 2.12.4 or later.
What is the CVSS score of CVE-2017-15288?
CVE-2017-15288 has a CVSS v3.1 base score of 7.8 (HIGH) with vector string CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H.
What CWE is associated with CVE-2017-15288?
CVE-2017-15288 is classified under CWE-732: Incorrect Permission Assignment for Critical Resource (The product specifies permissions for a security-critical resource in a way that allows that resource to be read or modified by unintended actors.).
How can I check Maven dependencies for CVE-2017-15288?
Run the dependency tree command: 'mvn dependency:tree -Dincludes=org.scala-lang'. This command lists direct and transitive dependencies in your build configuration so you can verify if a vulnerable version is resolved.
Machine-readable OSV JSON OSV v1.5 Schema
Normalized schema output
{
  "schema_version" : "1.4.0",
  "id" : "GHSA-qvxv-pmq9-4q7g",
  "modified" : "2021-09-16T21:08:26Z",
  "published" : "2018-10-19T16:51:11Z",
  "aliases" : [ "CVE-2017-15288" ],
  "summary" : "High severity vulnerability that affects org.scala-lang:scala-compiler",
  "details" : "The compilation daemon in Scala before 2.10.7, 2.11.x before 2.11.12, and 2.12.x before 2.12.4 uses weak permissions for private files in /tmp/scala-devel/${USER:shared}/scalac-compile-server-port, which allows local users to write to arbitrary class files and consequently gain privileges.",
  "severity" : [ {
    "type" : "CVSS_V3",
    "score" : "CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H"
  } ],
  "affected" : [ {
    "package" : {
      "ecosystem" : "Maven",
      "name" : "org.scala-lang:scala-compiler"
    },
    "ranges" : [ {
      "type" : "ECOSYSTEM",
      "events" : [ {
        "introduced" : "0"
      }, {
        "fixed" : "2.10.7"
      } ]
    } ]
  }, {
    "package" : {
      "ecosystem" : "Maven",
      "name" : "org.scala-lang:scala-compiler"
    },
    "ranges" : [ {
      "type" : "ECOSYSTEM",
      "events" : [ {
        "introduced" : "2.11.0"
      }, {
        "fixed" : "2.11.12"
      } ]
    } ]
  }, {
    "package" : {
      "ecosystem" : "Maven",
      "name" : "org.scala-lang:scala-compiler"
    },
    "ranges" : [ {
      "type" : "ECOSYSTEM",
      "events" : [ {
        "introduced" : "2.12.0"
      }, {
        "fixed" : "2.12.4"
      } ]
    } ]
  } ],
  "references" : [ {
    "type" : "ADVISORY",
    "url" : "https://nvd.nist.gov/vuln/detail/CVE-2017-15288"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/scala/scala/pull/6108"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/scala/scala/pull/6120"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/scala/scala/pull/6128"
  }, {
    "type" : "WEB",
    "url" : "https://security.gentoo.org/glsa/201812-08"
  }, {
    "type" : "WEB",
    "url" : "https://lists.apache.org/thread.html/rf57e4d7211b30e51803911304f3b7b54393f7a4bd60bb0784c31eec1@%3Cjira.kafka.apache.org%3E"
  }, {
    "type" : "WEB",
    "url" : "https://lists.apache.org/thread.html/re72f4d04dfc398aae0e38dbfeccf44780df2782623a610cbfcec6f3a@%3Cjira.kafka.apache.org%3E"
  }, {
    "type" : "WEB",
    "url" : "https://lists.apache.org/thread.html/r628ea3ea2fed4d9c1c5232a0b1ed108a15abc9fd2f0aaca1e8cc9164@%3Cdev.kafka.apache.org%3E"
  }, {
    "type" : "WEB",
    "url" : "https://lists.apache.org/thread.html/r5a1418a4f5101f5af3fc14bf358c54f2c7200e6a3701de2e2f581e1b@%3Cdev.kafka.apache.org%3E"
  }, {
    "type" : "WEB",
    "url" : "https://lists.apache.org/thread.html/r3f10022ec972c8df29a950d1a591c16562eeddd9194d3010e46b9b76@%3Cjira.kafka.apache.org%3E"
  }, {
    "type" : "WEB",
    "url" : "https://lists.apache.org/thread.html/r33665e9213cc6df1e48c3d99d1b0c7a3203e9bd0ef4fc4ba838bcb04@%3Cjira.kafka.apache.org%3E"
  }, {
    "type" : "WEB",
    "url" : "https://lists.apache.org/thread.html/r32e0b1d5ff43ac3ed4b179a4e663022d1c5ccac77884a99ea149e633@%3Ccommits.druid.apache.org%3E"
  }, {
    "type" : "WEB",
    "url" : "https://lists.apache.org/thread.html/r1d51eae81ceb7bfd1780936a48b460ab31d53ff2ed526a88a7f60fe4@%3Ccommits.druid.apache.org%3E"
  }, {
    "type" : "WEB",
    "url" : "https://lists.apache.org/thread.html/r18a05115cfa078c0f4e5c1ea2e8d64804f63e0095aa2174a3afecc0f@%3Cjira.kafka.apache.org%3E"
  }, {
    "type" : "WEB",
    "url" : "https://lists.apache.org/thread.html/r10dd8e5b3bbe3bb531aa4a65472ce56f91efbb77ea9fe04bb8272e2c@%3Cjira.kafka.apache.org%3E"
  }, {
    "type" : "WEB",
    "url" : "https://lists.apache.org/thread.html/f9bc3e55f4e28d1dcd1a69aae6d53e609a758e34d2869b4d798e13cc@%3Cissues.drill.apache.org%3E"
  }, {
    "type" : "WEB",
    "url" : "https://lists.apache.org/thread.html/b0656d359c7d40ec9f39c8cc61bca66802ef9a2a12ee199f5b0c1442@%3Cdev.drill.apache.org%3E"
  }, {
    "type" : "WEB",
    "url" : "https://lists.apache.org/thread.html/519eb0fd45642dcecd9ff74cb3e71c20a4753f7d82e2f07864b5108f@%3Cdev.drill.apache.org%3E"
  }, {
    "type" : "WEB",
    "url" : "https://lists.apache.org/thread.html/053d9ce4d579b02203db18545fee5e33f35f2932885459b74d1e4272@%3Cissues.activemq.apache.org%3E"
  }, {
    "type" : "PACKAGE",
    "url" : "https://github.com/scala/scala"
  }, {
    "type" : "ADVISORY",
    "url" : "https://github.com/advisories/GHSA-qvxv-pmq9-4q7g"
  }, {
    "type" : "WEB",
    "url" : "http://scala-lang.org/news/security-update-nov17.html"
  } ],
  "database_specific" : {
    "cwe_ids" : [ "CWE-732" ],
    "severity" : "HIGH",
    "github_reviewed" : true,
    "github_reviewed_at" : "2020-06-16T21:52:54Z",
    "nvd_published_at" : "2017-11-15T16:29:00Z"
  }
}