Vulnerabilities in pkg:maven/org.springframework/spring-messaging

PACKAGE
Advisory Identifier: GHSA-3rmv-2pg5-xvqj
Advisory Summary

CVE-2018-1275 is a CRITICAL (CVSS 9.8) spring framework has improperly implemented vulnerability (CWE-94: Improper Control of Generation of Code ('Code Injection')) affecting Spring Framework libraries in the Maven ecosystem. The issue involves spring framework has improperly implemented security check for standard. Remediation is available by upgrading affected packages to version 4.3.16.RELEASE, 5.0.5.RELEASE.

3 Known Advisory Record(s)
Package Vulnerability Intelligence

pkg:maven/org.springframework/spring-messaging

3 Known Advisory Record(s)

Vulnerability advisories affecting package pkg:maven/org.springframework/spring-messaging. Select an advisory below to view technical details or fixes.

Advisory ID CVE / NVD Severity Summary
GHSA-3rmv-2pg5-xvqj CVE-2018-1275 CRITICAL Spring Framework has Improperly Implemented Security Check for Standard
GHSA-p5hg-3xm3-gcjg CVE-2018-1270 CRITICAL Spring Framework allows applications to expose STOMP over WebSocket endpoints
GHSA-rqph-vqwm-22vc CVE-2022-22971 MODERATE Allocation of Resources Without Limits or Throttling in Spring Framework

CVE-2018-1275 at a Glance

CVE Identifier CVE-2018-1275
GHSA Identifier GHSA-3rmv-2pg5-xvqj
Severity CRITICAL
CVSS v3.1 Base Score 9.8
CWE Classification CWE-94: Improper Control of Generation of Code ('Code Injection')
Affected Product Spring Framework
Package Ecosystem Maven
Published Date
Last Updated

Security Impact

CVSS: 9.8

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

Attack Vector Network (AV:N)
Attack Complexity Low (AC:L)
Privileges Required None (PR:N)
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-2018-1275

To remediate this vulnerability, upgrade all affected Spring Framework 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.springframework:spring-messaging fixed: 4.3.16.RELEASE
<dependency>
    <groupId>org.springframework</groupId>
    <artifactId>spring-messaging</artifactId>
    <version>4.3.16.RELEASE</version>
</dependency>
org.springframework:spring-messaging fixed: 5.0.5.RELEASE
<dependency>
    <groupId>org.springframework</groupId>
    <artifactId>spring-messaging</artifactId>
    <version>5.0.5.RELEASE</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.springframework

How to Check if You Are Affected

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

mvn dependency:tree -Dincludes=org.springframework

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

Note: The mvn dependency:tree -Dincludes=org.springframework 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-94: Improper Control of Generation of Code ('Code Injection'), where the product constructs all or part of a code segment using externally-influenced input from an upstream component, but it does not neutralize or incorrectly neutralizes special elements that could modify the syntax or behavior of the intended code segment. In Spring Framework, 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

Spring Framework, versions 5.0 prior to 5.0.5 and versions 4.3 prior to 4.3.16 and older unsupported versions, allow applications to expose STOMP over WebSocket endpoints with a simple, in-memory STOMP broker through the spring-messaging module. A malicious user (or attacker) can craft a message to the broker that can lead to a remote code execution attack. This CVE addresses the partial fix for CVE-2018-1270 in the 4.3.x branch of the Spring Framework.

CVE-2018-1275 Affected Spring Framework Versions

2 component(s)
Fixed Versions:
4.3.16.RELEASE5.0.5.RELEASE
Product / Package Ecosystem Affected Versions Fixed Version
org.springframework:spring-messaging
Maven
< 4.3.16.RELEASE
4.3.16.RELEASE
org.springframework:spring-messaging
Maven
≥ 5.0.0.RELEASE
< 5.0.5.RELEASE
5.0.5.RELEASE

References

NVD — CVE-2018-1275 NVD
https://nvd.nist.gov/vuln/detail/CVE-2018-1275
Security Fix Commit FIX COMMIT
https://github.com/spring-projects/spring-framework/commit/0009806debb578e884f6dc98bd1f2dc668020021
Security Fix Commit FIX COMMIT
https://github.com/spring-projects/spring-framework/commit/e0de9126ed8cf25cf141d3e66420da94e350708a
access.redhat.com/errata/rhsa-2018:13... WEB
https://access.redhat.com/errata/RHSA-2018:1320
access.redhat.com/errata/rhsa-2018:29... WEB
https://access.redhat.com/errata/RHSA-2018:2939
Spring Framework Source Repository REPOSITORY
https://github.com/spring-projects/spring-framework
lists.apache.org/thread.html/4ed49b1... WEB
https://lists.apache.org/thread.html/4ed49b103f64a0cecb38064f26cbf1389afc12124653da2d35166dbe@%3Cissues.activemq.apache.org%3E
lists.apache.org/thread.html/ab825fc... WEB
https://lists.apache.org/thread.html/ab825fcade0b49becfa30235b3d54f4a51bb74ea96b6c9adb5d1378c@%3Cissues.activemq.apache.org%3E
lists.apache.org/thread.html/dcf8599... WEB
https://lists.apache.org/thread.html/dcf8599b80e43a6b60482607adb76c64672772dc2d9209ae2170f369@%3Cissues.activemq.apache.org%3E
Spring Framework Security Information SECURITY
https://pivotal.io/security/cve-2018-1275
Spring Framework Security Information SECURITY
https://web.archive.org/web/20190901081835/http://www.securitytracker.com/id/1041301
Spring Framework Security Information SECURITY
https://web.archive.org/web/20200227033125/http://www.securityfocus.com/bid/103771
Spring Framework Security Information SECURITY
https://www.oracle.com/security-alerts/cpujul2020.html
Spring Framework Security Information SECURITY
https://www.oracle.com/security-alerts/cpuoct2021.html
Spring Framework Security Information SECURITY
https://www.oracle.com/technetwork/security-advisory/cpujan2019-5072801.html
Spring Framework Security Information SECURITY
https://www.oracle.com/technetwork/security-advisory/cpujul2019-5072835.html
Spring Framework Security Information SECURITY
http://www.oracle.com/technetwork/security-advisory/cpujul2018-4258247.html
Spring Framework Security Information SECURITY
http://www.oracle.com/technetwork/security-advisory/cpuoct2018-4428296.html

Frequently Asked Questions

What is CVE-2018-1275?
CVE-2018-1275 is a security vulnerability in Spring Framework involving Spring Framework has Improperly Implemented Security Check for Standard under CWE-94: Improper Control of Generation of Code ('Code Injection').
Which Spring Framework versions are affected?
Affected versions include releases prior to 4.3.16.RELEASE, 5.0.5.RELEASE across affected packages: org.springframework:spring-messaging.
What version fixes CVE-2018-1275?
Upgrading to 4.3.16.RELEASE, 5.0.5.RELEASE (or the latest patched release for your respective branch) resolves the vulnerability.
Is spring-messaging affected?
Yes, org.springframework:spring-messaging is affected in releases prior to 4.3.16.RELEASE, 5.0.5.RELEASE. Upgrade your dependency to 4.3.16.RELEASE, 5.0.5.RELEASE or later.
What is the CVSS score of CVE-2018-1275?
CVE-2018-1275 has a CVSS v3.1 base score of 9.8 (CRITICAL) with vector string CVSS:3.0/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H.
What CWE is associated with CVE-2018-1275?
CVE-2018-1275 is classified under CWE-94: Improper Control of Generation of Code ('Code Injection') (The product constructs all or part of a code segment using externally-influenced input from an upstream component, but it does not neutralize or incorrectly neutralizes special elements that could modify the syntax or behavior of the intended code segment.).
How can I check Maven dependencies for CVE-2018-1275?
Run the dependency tree command: 'mvn dependency:tree -Dincludes=org.springframework'. 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-3rmv-2pg5-xvqj",
  "modified" : "2025-01-31T19:35:35Z",
  "published" : "2018-10-17T20:28:00Z",
  "aliases" : [ "CVE-2018-1275" ],
  "summary" : "Spring Framework has Improperly Implemented Security Check for Standard",
  "details" : "Spring Framework, versions 5.0 prior to 5.0.5 and versions 4.3 prior to 4.3.16 and older unsupported versions, allow applications to expose STOMP over WebSocket endpoints with a simple, in-memory STOMP broker through the spring-messaging module. A malicious user (or attacker) can craft a message to the broker that can lead to a remote code execution attack. This CVE addresses the partial fix for CVE-2018-1270 in the 4.3.x branch of the Spring Framework.",
  "severity" : [ {
    "type" : "CVSS_V3",
    "score" : "CVSS:3.0/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H"
  } ],
  "affected" : [ {
    "package" : {
      "ecosystem" : "Maven",
      "name" : "org.springframework:spring-messaging"
    },
    "ranges" : [ {
      "type" : "ECOSYSTEM",
      "events" : [ {
        "introduced" : "0"
      }, {
        "fixed" : "4.3.16.RELEASE"
      } ]
    } ]
  }, {
    "package" : {
      "ecosystem" : "Maven",
      "name" : "org.springframework:spring-messaging"
    },
    "ranges" : [ {
      "type" : "ECOSYSTEM",
      "events" : [ {
        "introduced" : "5.0.0.RELEASE"
      }, {
        "fixed" : "5.0.5.RELEASE"
      } ]
    } ]
  } ],
  "references" : [ {
    "type" : "ADVISORY",
    "url" : "https://nvd.nist.gov/vuln/detail/CVE-2018-1275"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/spring-projects/spring-framework/commit/0009806debb578e884f6dc98bd1f2dc668020021"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/spring-projects/spring-framework/commit/e0de9126ed8cf25cf141d3e66420da94e350708a"
  }, {
    "type" : "WEB",
    "url" : "https://access.redhat.com/errata/RHSA-2018:1320"
  }, {
    "type" : "WEB",
    "url" : "https://access.redhat.com/errata/RHSA-2018:2939"
  }, {
    "type" : "PACKAGE",
    "url" : "https://github.com/spring-projects/spring-framework"
  }, {
    "type" : "WEB",
    "url" : "https://lists.apache.org/thread.html/4ed49b103f64a0cecb38064f26cbf1389afc12124653da2d35166dbe@%3Cissues.activemq.apache.org%3E"
  }, {
    "type" : "WEB",
    "url" : "https://lists.apache.org/thread.html/ab825fcade0b49becfa30235b3d54f4a51bb74ea96b6c9adb5d1378c@%3Cissues.activemq.apache.org%3E"
  }, {
    "type" : "WEB",
    "url" : "https://lists.apache.org/thread.html/dcf8599b80e43a6b60482607adb76c64672772dc2d9209ae2170f369@%3Cissues.activemq.apache.org%3E"
  }, {
    "type" : "WEB",
    "url" : "https://pivotal.io/security/cve-2018-1275"
  }, {
    "type" : "WEB",
    "url" : "https://web.archive.org/web/20190901081835/http://www.securitytracker.com/id/1041301"
  }, {
    "type" : "WEB",
    "url" : "https://web.archive.org/web/20200227033125/http://www.securityfocus.com/bid/103771"
  }, {
    "type" : "WEB",
    "url" : "https://www.oracle.com/security-alerts/cpujul2020.html"
  }, {
    "type" : "WEB",
    "url" : "https://www.oracle.com/security-alerts/cpuoct2021.html"
  }, {
    "type" : "WEB",
    "url" : "https://www.oracle.com/technetwork/security-advisory/cpujan2019-5072801.html"
  }, {
    "type" : "WEB",
    "url" : "https://www.oracle.com/technetwork/security-advisory/cpujul2019-5072835.html"
  }, {
    "type" : "WEB",
    "url" : "http://www.oracle.com/technetwork/security-advisory/cpujul2018-4258247.html"
  }, {
    "type" : "WEB",
    "url" : "http://www.oracle.com/technetwork/security-advisory/cpuoct2018-4428296.html"
  } ],
  "database_specific" : {
    "cwe_ids" : [ "CWE-358", "CWE-94" ],
    "severity" : "CRITICAL",
    "github_reviewed" : true,
    "github_reviewed_at" : "2020-06-16T20:56:14Z",
    "nvd_published_at" : "2018-04-11T13:29:00Z"
  }
}