Vulnerabilites related to Spring - Spring Cloud Config
CVE-2025-22232 (GCVE-0-2025-22232)
Vulnerability from cvelistv5
Published
2025-04-10 17:26
Modified
2025-04-10 18:08
CWE
  • CWE-287 - Improper Authentication
Summary
Spring Cloud Config Server may not use Vault token sent by clients using a X-CONFIG-TOKEN header when making requests to Vault. Your application may be affected by this if the following are true: * You have Spring Vault on the classpath of your Spring Cloud Config Server and * You are using the X-CONFIG-TOKEN header to send a Vault token to the Spring Cloud Config Server for the Config Server to use when making requests to Vault and * You are using the default Spring Vault SessionManager implementation LifecycleAwareSessionManager or a SessionManager implementation that persists the Vault token such as SimpleSessionManager. In this case the SessionManager persists the first token it retrieves and will continue to use that token even if client requests to the Spring Cloud Config Server include a X-CONFIG-TOKEN header with a different value. Affected Spring Products and Versions Spring Cloud Config: * 2.2.1.RELEASE - 4.2.1 Mitigation Users of affected versions should upgrade to the corresponding fixed version. Affected version(s)Fix versionAvailability4.2.x4.2.2OSS4.1.x4.1.6OSS4.0.x4.0.10Commercial3.1.x3.1.10Commercial3.0.x4.1.6OSS2.2.x4.1.6OSS NOTE: Spring Cloud Config 3.0.x and 2.2.x are no longer under open source or commercial support. Users of these versions are encouraged to upgrade to a supported version. No other mitigation steps are necessary.
Impacted products
Vendor Product Version
Spring Spring Cloud Config Version: 4.2.x   < 4.2.2
Version: 4.1.x   < 4.1.6
Version: 4.0.x   < 4.0.10
Version: 3.1.x   < 3.1.10
Version: 3.0.x   < 4.1.6
Version: 2.2.x   < 4.1.6
Create a notification for this product.
Show details on NVD website


{
  "containers": {
    "adp": [
      {
        "metrics": [
          {
            "other": {
              "content": {
                "id": "CVE-2025-22232",
                "options": [
                  {
                    "Exploitation": "none"
                  },
                  {
                    "Automatable": "yes"
                  },
                  {
                    "Technical Impact": "partial"
                  }
                ],
                "role": "CISA Coordinator",
                "timestamp": "2025-04-10T18:08:12.310467Z",
                "version": "2.0.3"
              },
              "type": "ssvc"
            }
          }
        ],
        "providerMetadata": {
          "dateUpdated": "2025-04-10T18:08:28.560Z",
          "orgId": "134c704f-9b21-4f2e-91b3-4a467353bcc0",
          "shortName": "CISA-ADP"
        },
        "title": "CISA ADP Vulnrichment"
      }
    ],
    "cna": {
      "affected": [
        {
          "defaultStatus": "unaffected",
          "product": "Spring Cloud Config",
          "vendor": "Spring",
          "versions": [
            {
              "lessThan": "4.2.2",
              "status": "affected",
              "version": "4.2.x",
              "versionType": "custom"
            },
            {
              "lessThan": "4.1.6",
              "status": "affected",
              "version": "4.1.x",
              "versionType": "custom"
            },
            {
              "lessThan": "4.0.10",
              "status": "affected",
              "version": "4.0.x",
              "versionType": "custom"
            },
            {
              "lessThan": "3.1.10",
              "status": "affected",
              "version": "3.1.x",
              "versionType": "custom"
            },
            {
              "lessThan": "4.1.6",
              "status": "affected",
              "version": "3.0.x",
              "versionType": "custom"
            },
            {
              "lessThan": "4.1.6",
              "status": "affected",
              "version": "2.2.x",
              "versionType": "custom"
            }
          ]
        }
      ],
      "datePublic": "2025-04-07T16:40:00.000Z",
      "descriptions": [
        {
          "lang": "en",
          "supportingMedia": [
            {
              "base64": false,
              "type": "text/html",
              "value": "Spring Cloud Config Server may not use Vault token sent by clients using a \u003ccode\u003eX-CONFIG-TOKEN\u003c/code\u003e\u0026nbsp;header when making requests to Vault.\u003cbr\u003eYour application may be affected by this if the following are true:\u003cbr\u003e\u003col\u003e\u003cli\u003eYou have Spring Vault on the classpath of your Spring Cloud Config Server and\u003c/li\u003e\u003cli\u003eYou are using the \u003ccode\u003eX-CONFIG-TOKEN\u003c/code\u003e\u0026nbsp;header to send a Vault token to the Spring Cloud Config Server for the Config Server to use when making requests to Vault and\u003c/li\u003e\u003cli\u003eYou are using the default Spring Vault \u003ccode\u003eSessionManager\u003c/code\u003e\u0026nbsp;implementation \u003ccode\u003eLifecycleAwareSessionManager\u003c/code\u003e\u0026nbsp;or a \u003ccode\u003eSessionManager\u003c/code\u003e\u0026nbsp;implementation that persists the Vault token such as \u003ccode\u003eSimpleSessionManager\u003c/code\u003e.\u003c/li\u003e\u003c/ol\u003e\u003cbr\u003eIn this case the \u003ccode\u003eSessionManager\u003c/code\u003e\u0026nbsp;persists the first token it retrieves and will continue to use that token even if client requests to the Spring Cloud Config Server include a \u003ccode\u003eX-CONFIG-TOKEN\u003c/code\u003e\u0026nbsp;header with a different value.\u003cbr\u003eAffected Spring Products and Versions\u003cbr\u003eSpring Cloud Config:\u003cbr\u003e\u003cul\u003e\u003cli\u003e2.2.1.RELEASE - 4.2.1\u003c/li\u003e\u003c/ul\u003eMitigation\u003cbr\u003eUsers of affected versions should upgrade to the corresponding fixed version.\u003cbr\u003e\u003cbr\u003e\u003ctable\u003e\u003cthead\u003e\u003ctr\u003e\u003cth\u003eAffected version(s)\u003c/th\u003e\u003cth\u003eFix version\u003c/th\u003e\u003cth\u003eAvailability\u003c/th\u003e\u003c/tr\u003e\u003c/thead\u003e\u003ctbody\u003e\u003ctr\u003e\u003ctd\u003e4.2.x\u003c/td\u003e\u003ctd\u003e4.2.2\u003c/td\u003e\u003ctd\u003eOSS\u003c/td\u003e\u003c/tr\u003e\u003ctr\u003e\u003ctd\u003e4.1.x\u003c/td\u003e\u003ctd\u003e4.1.6\u003c/td\u003e\u003ctd\u003eOSS\u003c/td\u003e\u003c/tr\u003e\u003ctr\u003e\u003ctd\u003e4.0.x\u003c/td\u003e\u003ctd\u003e4.0.10\u003c/td\u003e\u003ctd\u003eCommercial\u003c/td\u003e\u003c/tr\u003e\u003ctr\u003e\u003ctd\u003e3.1.x\u003c/td\u003e\u003ctd\u003e3.1.10\u003c/td\u003e\u003ctd\u003eCommercial\u003c/td\u003e\u003c/tr\u003e\u003ctr\u003e\u003ctd\u003e3.0.x\u003c/td\u003e\u003ctd\u003e4.1.6\u003c/td\u003e\u003ctd\u003eOSS\u003c/td\u003e\u003c/tr\u003e\u003ctr\u003e\u003ctd\u003e2.2.x\u003c/td\u003e\u003ctd\u003e4.1.6\u003c/td\u003e\u003ctd\u003eOSS\u003c/td\u003e\u003c/tr\u003e\u003c/tbody\u003e\u003c/table\u003e\u003cbr\u003eNOTE: Spring Cloud Config 3.0.x and 2.2.x are no longer under open source or commercial support. Users of these versions are encouraged to upgrade to a supported version.\u003cbr\u003e\u003cbr\u003eNo other mitigation steps are necessary.\u003cbr\u003e"
            }
          ],
          "value": "Spring Cloud Config Server may not use Vault token sent by clients using a X-CONFIG-TOKEN\u00a0header when making requests to Vault.\nYour application may be affected by this if the following are true:\n  *  You have Spring Vault on the classpath of your Spring Cloud Config Server and\n  *  You are using the X-CONFIG-TOKEN\u00a0header to send a Vault token to the Spring Cloud Config Server for the Config Server to use when making requests to Vault and\n  *  You are using the default Spring Vault SessionManager\u00a0implementation LifecycleAwareSessionManager\u00a0or a SessionManager\u00a0implementation that persists the Vault token such as SimpleSessionManager.\n\nIn this case the SessionManager\u00a0persists the first token it retrieves and will continue to use that token even if client requests to the Spring Cloud Config Server include a X-CONFIG-TOKEN\u00a0header with a different value.\nAffected Spring Products and Versions\nSpring Cloud Config:\n  *  2.2.1.RELEASE - 4.2.1\n\n\nMitigation\nUsers of affected versions should upgrade to the corresponding fixed version.\n\nAffected version(s)Fix versionAvailability4.2.x4.2.2OSS4.1.x4.1.6OSS4.0.x4.0.10Commercial3.1.x3.1.10Commercial3.0.x4.1.6OSS2.2.x4.1.6OSS\nNOTE: Spring Cloud Config 3.0.x and 2.2.x are no longer under open source or commercial support. Users of these versions are encouraged to upgrade to a supported version.\n\nNo other mitigation steps are necessary."
        }
      ],
      "metrics": [
        {
          "cvssV3_1": {
            "attackComplexity": "LOW",
            "attackVector": "NETWORK",
            "availabilityImpact": "NONE",
            "baseScore": 5.3,
            "baseSeverity": "MEDIUM",
            "confidentialityImpact": "LOW",
            "integrityImpact": "NONE",
            "privilegesRequired": "NONE",
            "scope": "UNCHANGED",
            "userInteraction": "NONE",
            "vectorString": "CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:L/I:N/A:N",
            "version": "3.1"
          },
          "format": "CVSS",
          "scenarios": [
            {
              "lang": "en",
              "value": "GENERAL"
            }
          ]
        }
      ],
      "problemTypes": [
        {
          "descriptions": [
            {
              "cweId": "CWE-287",
              "description": "CWE-287 Improper Authentication",
              "lang": "en",
              "type": "CWE"
            }
          ]
        }
      ],
      "providerMetadata": {
        "dateUpdated": "2025-04-10T17:26:56.755Z",
        "orgId": "dcf2e128-44bd-42ed-91e8-88f912c1401d",
        "shortName": "vmware"
      },
      "references": [
        {
          "url": "https://spring.io/security/cve-2025-22232"
        }
      ],
      "source": {
        "discovery": "UNKNOWN"
      },
      "title": "Spring Cloud Config Server May Not Use Vault Token Sent By Clients",
      "workarounds": [
        {
          "lang": "en",
          "supportingMedia": [
            {
              "base64": false,
              "type": "text/html",
              "value": "\u003cp\u003eIf you cannot upgrade, then you can either:\u003c/p\u003e\u003col\u003e\u003cli\u003eRemove Spring Vault from the classpath if it is not needed or\u003c/li\u003e\u003cli\u003eImplement your own \u003ccode\u003eSessionManager\u003c/code\u003e\u0026nbsp;that does not persist the Vault token and provide a bean using that implementation in a \u003ccode\u003e@Configuration\u003c/code\u003e\u0026nbsp;class. For example:\u003c/li\u003e\u003c/ol\u003e\u003cbr\u003e\u003ctt\u003e\u003cbr\u003epublic class StatelessSessionManager implements SessionManager {\u003cbr\u003e\u003cbr\u003e\u0026nbsp; private final ClientAuthentication clientAuthentication;\u003cbr\u003e\u003cbr\u003e\u0026nbsp; private final ReentrantLock lock = new ReentrantLock();\u003cbr\u003e\u003cbr\u003e\u0026nbsp; public StatelessSessionManager(ClientAuthentication clientAuthentication) {\u003cbr\u003e\u0026nbsp; \u0026nbsp; Assert.notNull(clientAuthentication, \"ClientAuthentication must not be null\");\u003cbr\u003e\u0026nbsp; \u0026nbsp; this.clientAuthentication = clientAuthentication;\u003cbr\u003e\u0026nbsp; }\u003cbr\u003e\u003cbr\u003e\u0026nbsp; public VaultToken getSessionToken() {\u003cbr\u003e\u0026nbsp; \u0026nbsp; this.lock.lock();\u003cbr\u003e\u0026nbsp; \u0026nbsp; try {\u003cbr\u003e\u0026nbsp; \u0026nbsp; \u0026nbsp; return this.clientAuthentication.login();\u003cbr\u003e\u0026nbsp; \u0026nbsp; }\u003cbr\u003e\u0026nbsp; \u0026nbsp; finally {\u003cbr\u003e\u0026nbsp; \u0026nbsp; \u0026nbsp; this.lock.unlock();\u003cbr\u003e\u0026nbsp; \u0026nbsp; }\u003cbr\u003e\u0026nbsp; }\u003cbr\u003e\u003cbr\u003e}\u003cbr\u003e\u003cbr\u003e@Configuration\u003cbr\u003epublic class MySessionManagerConfiguration extends SpringVaultClientConfiguration {\u003cbr\u003e\u003cbr\u003e\u0026nbsp; private final VaultEnvironmentProperties vaultProperties;\u003cbr\u003e\u003cbr\u003e\u0026nbsp; public MySessionManagerConfiguration(VaultEnvironmentProperties vaultProperties, ConfigTokenProvider configTokenProvider, List\u0026lt;springvaultclientauthenticationprovider\u0026gt; authProviders) {\u003cbr\u003e\u0026nbsp; \u0026nbsp; super(vaultProperties, configTokenProvider, authProviders);\u003cbr\u003e\u0026nbsp; \u0026nbsp; this.vaultProperties = vaultProperties;\u003cbr\u003e\u0026nbsp; }\u003cbr\u003e\u003cbr\u003e\u0026nbsp; @Bean\u003cbr\u003e\u0026nbsp; @Primary\u003cbr\u003e\u0026nbsp; public SessionManager sessionManager() {\u003cbr\u003e\u0026nbsp; \u0026nbsp; if (vaultProperties.getAuthentication() == null \u0026amp;\u0026amp; !StringUtils.hasText(vaultProperties.getToken())) {\u003cbr\u003e\u0026nbsp; \u0026nbsp; \u0026nbsp; return new StatelessSessionManager(clientAuthentication());\u003cbr\u003e\u0026nbsp; \u0026nbsp; }\u003cbr\u003e\u0026nbsp; \u0026nbsp; return super.sessionManager();\u003cbr\u003e\u0026nbsp; }\u003cbr\u003e}\u003cbr\u003e\u0026lt;/springvaultclientauthenticationprovider\u0026gt;\u003cbr\u003e\u003c/tt\u003e\u003cbr\u003e"
            }
          ],
          "value": "If you cannot upgrade, then you can either:\n\n  *  Remove Spring Vault from the classpath if it is not needed or\n  *  Implement your own SessionManager\u00a0that does not persist the Vault token and provide a bean using that implementation in a @Configuration\u00a0class. For example:\n\n\npublic class StatelessSessionManager implements SessionManager {\n\n\u00a0 private final ClientAuthentication clientAuthentication;\n\n\u00a0 private final ReentrantLock lock = new ReentrantLock();\n\n\u00a0 public StatelessSessionManager(ClientAuthentication clientAuthentication) {\n\u00a0 \u00a0 Assert.notNull(clientAuthentication, \"ClientAuthentication must not be null\");\n\u00a0 \u00a0 this.clientAuthentication = clientAuthentication;\n\u00a0 }\n\n\u00a0 public VaultToken getSessionToken() {\n\u00a0 \u00a0 this.lock.lock();\n\u00a0 \u00a0 try {\n\u00a0 \u00a0 \u00a0 return this.clientAuthentication.login();\n\u00a0 \u00a0 }\n\u00a0 \u00a0 finally {\n\u00a0 \u00a0 \u00a0 this.lock.unlock();\n\u00a0 \u00a0 }\n\u00a0 }\n\n}\n\n@Configuration\npublic class MySessionManagerConfiguration extends SpringVaultClientConfiguration {\n\n\u00a0 private final VaultEnvironmentProperties vaultProperties;\n\n\u00a0 public MySessionManagerConfiguration(VaultEnvironmentProperties vaultProperties, ConfigTokenProvider configTokenProvider, List\u003cspringvaultclientauthenticationprovider\u003e authProviders) {\n\u00a0 \u00a0 super(vaultProperties, configTokenProvider, authProviders);\n\u00a0 \u00a0 this.vaultProperties = vaultProperties;\n\u00a0 }\n\n\u00a0 @Bean\n\u00a0 @Primary\n\u00a0 public SessionManager sessionManager() {\n\u00a0 \u00a0 if (vaultProperties.getAuthentication() == null \u0026\u0026 !StringUtils.hasText(vaultProperties.getToken())) {\n\u00a0 \u00a0 \u00a0 return new StatelessSessionManager(clientAuthentication());\n\u00a0 \u00a0 }\n\u00a0 \u00a0 return super.sessionManager();\n\u00a0 }\n}\n\u003c/springvaultclientauthenticationprovider\u003e"
        }
      ],
      "x_generator": {
        "engine": "Vulnogram 0.2.0"
      }
    }
  },
  "cveMetadata": {
    "assignerOrgId": "dcf2e128-44bd-42ed-91e8-88f912c1401d",
    "assignerShortName": "vmware",
    "cveId": "CVE-2025-22232",
    "datePublished": "2025-04-10T17:26:56.755Z",
    "dateReserved": "2025-01-02T04:29:59.191Z",
    "dateUpdated": "2025-04-10T18:08:28.560Z",
    "state": "PUBLISHED"
  },
  "dataType": "CVE_RECORD",
  "dataVersion": "5.1"
}

CVE-2019-3799 (GCVE-0-2019-3799)
Vulnerability from cvelistv5
Published
2019-05-06 15:21
Modified
2024-09-17 00:16
Severity ?
CWE
Summary
Spring Cloud Config, versions 2.1.x prior to 2.1.2, versions 2.0.x prior to 2.0.4, and versions 1.4.x prior to 1.4.6, and older unsupported versions allow applications to serve arbitrary configuration files through the spring-cloud-config-server module. A malicious user, or attacker, can send a request using a specially crafted URL that can lead a directory traversal attack.
References
Impacted products
Vendor Product Version
Spring Spring Cloud Config Version: 2.0   < v2.0.4.RELEASE
Version: 1.4   < v1.4.6.RELEASE
Version: 2.1   < v2.1.2.RELEASE
Create a notification for this product.
Show details on NVD website


{
  "containers": {
    "adp": [
      {
        "providerMetadata": {
          "dateUpdated": "2024-08-04T19:19:18.484Z",
          "orgId": "af854a3a-2127-422b-91ae-364da2661108",
          "shortName": "CVE"
        },
        "references": [
          {
            "tags": [
              "x_refsource_MISC",
              "x_transferred"
            ],
            "url": "https://www.oracle.com/security-alerts/cpuapr2022.html"
          },
          {
            "tags": [
              "x_refsource_CONFIRM",
              "x_transferred"
            ],
            "url": "https://pivotal.io/security/cve-2019-3799"
          }
        ],
        "title": "CVE Program Container"
      }
    ],
    "cna": {
      "affected": [
        {
          "product": "Spring Cloud Config",
          "vendor": "Spring",
          "versions": [
            {
              "lessThan": "v2.0.4.RELEASE",
              "status": "affected",
              "version": "2.0",
              "versionType": "custom"
            },
            {
              "lessThan": "v1.4.6.RELEASE",
              "status": "affected",
              "version": "1.4",
              "versionType": "custom"
            },
            {
              "lessThan": "v2.1.2.RELEASE",
              "status": "affected",
              "version": "2.1",
              "versionType": "custom"
            }
          ]
        }
      ],
      "datePublic": "2019-04-17T00:00:00",
      "descriptions": [
        {
          "lang": "en",
          "value": "Spring Cloud Config, versions 2.1.x prior to 2.1.2, versions 2.0.x prior to 2.0.4, and versions 1.4.x prior to 1.4.6, and older unsupported versions allow applications to serve arbitrary configuration files through the spring-cloud-config-server module. A malicious user, or attacker, can send a request using a specially crafted URL that can lead a directory traversal attack."
        }
      ],
      "problemTypes": [
        {
          "descriptions": [
            {
              "cweId": "CWE-22",
              "description": "CWE-22: Path Traversal",
              "lang": "en",
              "type": "CWE"
            }
          ]
        }
      ],
      "providerMetadata": {
        "dateUpdated": "2022-04-19T23:20:44",
        "orgId": "c550e75a-17ff-4988-97f0-544cde3820fe",
        "shortName": "dell"
      },
      "references": [
        {
          "tags": [
            "x_refsource_MISC"
          ],
          "url": "https://www.oracle.com/security-alerts/cpuapr2022.html"
        },
        {
          "tags": [
            "x_refsource_CONFIRM"
          ],
          "url": "https://pivotal.io/security/cve-2019-3799"
        }
      ],
      "source": {
        "discovery": "UNKNOWN"
      },
      "title": "Directory Traversal with spring-cloud-config-server",
      "x_legacyV4Record": {
        "CVE_data_meta": {
          "ASSIGNER": "secure@dell.com",
          "DATE_PUBLIC": "2019-04-17T00:00:00.000Z",
          "ID": "CVE-2019-3799",
          "STATE": "PUBLIC",
          "TITLE": "Directory Traversal with spring-cloud-config-server"
        },
        "affects": {
          "vendor": {
            "vendor_data": [
              {
                "product": {
                  "product_data": [
                    {
                      "product_name": "Spring Cloud Config",
                      "version": {
                        "version_data": [
                          {
                            "affected": "\u003c",
                            "version_affected": "\u003c",
                            "version_name": "2.0",
                            "version_value": "v2.0.4.RELEASE"
                          },
                          {
                            "affected": "\u003c",
                            "version_affected": "\u003c",
                            "version_name": "1.4",
                            "version_value": "v1.4.6.RELEASE"
                          },
                          {
                            "affected": "\u003c",
                            "version_affected": "\u003c",
                            "version_name": "2.1",
                            "version_value": "v2.1.2.RELEASE"
                          }
                        ]
                      }
                    }
                  ]
                },
                "vendor_name": "Spring"
              }
            ]
          }
        },
        "data_format": "MITRE",
        "data_type": "CVE",
        "data_version": "4.0",
        "description": {
          "description_data": [
            {
              "lang": "eng",
              "value": "Spring Cloud Config, versions 2.1.x prior to 2.1.2, versions 2.0.x prior to 2.0.4, and versions 1.4.x prior to 1.4.6, and older unsupported versions allow applications to serve arbitrary configuration files through the spring-cloud-config-server module. A malicious user, or attacker, can send a request using a specially crafted URL that can lead a directory traversal attack."
            }
          ]
        },
        "problemtype": {
          "problemtype_data": [
            {
              "description": [
                {
                  "lang": "eng",
                  "value": "CWE-22: Path Traversal"
                }
              ]
            }
          ]
        },
        "references": {
          "reference_data": [
            {
              "name": "https://www.oracle.com/security-alerts/cpuapr2022.html",
              "refsource": "MISC",
              "url": "https://www.oracle.com/security-alerts/cpuapr2022.html"
            },
            {
              "name": "https://pivotal.io/security/cve-2019-3799",
              "refsource": "CONFIRM",
              "url": "https://pivotal.io/security/cve-2019-3799"
            }
          ]
        },
        "source": {
          "discovery": "UNKNOWN"
        }
      }
    }
  },
  "cveMetadata": {
    "assignerOrgId": "c550e75a-17ff-4988-97f0-544cde3820fe",
    "assignerShortName": "dell",
    "cveId": "CVE-2019-3799",
    "datePublished": "2019-05-06T15:21:37.135488Z",
    "dateReserved": "2019-01-03T00:00:00",
    "dateUpdated": "2024-09-17T00:16:21.820Z",
    "state": "PUBLISHED"
  },
  "dataType": "CVE_RECORD",
  "dataVersion": "5.1"
}