# CVE-2017-2582: keycloak-core discloses system properties

> An attacker can read system property values from the Keycloak server by crafting a malicious SAML request ID field.

- **Severity:** Medium 6.5 (`CVSS:3.0/AV:N/AC:L/PR:L/UI:N/S:U/C:H/I:N/A:N`)
- **Exploited in the wild:** Not known
- **Login needed:** Any signed-in user
- **Attackable:** Over the internet
- **Victim action needed:** Not needed
- **Fix available:** Yes
- **Published:** 26 Jul 2018
- **Updated:** 5 Aug 2024
- **Also known as:** GHSA-c77r-6f64-478q, RHSA-2017:3216, RHSA-2017:3217, RHSA-2017:3218, RHSA-2017:3219, RHSA-2019:0136, RHSA-2019:0137

## What is CVE-2017-2582?

CVE-2017-2582 is a medium-severity vulnerability in Redhat Jboss Enterprise Application Platform, published on 26 Jul 2018. Any signed-in user can exploit it over the network, with no action from the victim.

### Official description

It was found that while parsing the SAML messages the StaxParserUtil class of keycloak before 2.5.1 replaces special strings for obtaining attribute values with system property. This could allow an attacker to determine values of system properties at the attacked system by formatting the SAML request ID field to be the chosen system property which could be obtained in the "InResponseTo" field in the response.

Weakness: CWE-200 (Exposure of Sensitive Information to an Unauthorized Actor), CWE-201 (Insertion of Sensitive Information Into Sent Data)

## Which versions are affected by CVE-2017-2582?

2 open source packages ship an affected version, including org.keycloak:keycloak-core. It affects 2 products.


| Package | Ecosystem | Affected | Fixed in |
| --- | --- | --- | --- |
| `org.keycloak:keycloak-core` | Maven | All versions | 2.5.1 |
| `org.keycloak:keycloak-core` | Maven | All versions | 2.5.1 |
| `hornetq` | Red Hat:jboss_enterprise_application_platform:6::el5 | All versions | 0:2.3.25-24.SP22_redhat_1.1.ep6.el5 |
| `jboss-as-appclient` | Red Hat:jboss_enterprise_application_platform:6::el5 | All versions | 0:7.5.18-1.Final_redhat_1.1.ep6.el5 |
| `jboss-as-cli` | Red Hat:jboss_enterprise_application_platform:6::el5 | All versions | 0:7.5.18-1.Final_redhat_1.1.ep6.el5 |
| `jboss-as-client-all` | Red Hat:jboss_enterprise_application_platform:6::el5 | All versions | 0:7.5.18-1.Final_redhat_1.1.ep6.el5 |
| `jboss-as-clustering` | Red Hat:jboss_enterprise_application_platform:6::el5 | All versions | 0:7.5.18-1.Final_redhat_1.1.ep6.el5 |
| `jboss-as-cmp` | Red Hat:jboss_enterprise_application_platform:6::el5 | All versions | 0:7.5.18-1.Final_redhat_1.1.ep6.el5 |
| `jboss-as-configadmin` | Red Hat:jboss_enterprise_application_platform:6::el5 | All versions | 0:7.5.18-1.Final_redhat_1.1.ep6.el5 |
| `jboss-as-connector` | Red Hat:jboss_enterprise_application_platform:6::el5 | All versions | 0:7.5.18-1.Final_redhat_1.1.ep6.el5 |
| `jboss-as-controller` | Red Hat:jboss_enterprise_application_platform:6::el5 | All versions | 0:7.5.18-1.Final_redhat_1.1.ep6.el5 |
| `jboss-as-controller-client` | Red Hat:jboss_enterprise_application_platform:6::el5 | All versions | 0:7.5.18-1.Final_redhat_1.1.ep6.el5 |
| `jboss-as-core-security` | Red Hat:jboss_enterprise_application_platform:6::el5 | All versions | 0:7.5.18-1.Final_redhat_1.1.ep6.el5 |
| `jboss-as-deployment-repository` | Red Hat:jboss_enterprise_application_platform:6::el5 | All versions | 0:7.5.18-1.Final_redhat_1.1.ep6.el5 |
| `jboss-as-deployment-scanner` | Red Hat:jboss_enterprise_application_platform:6::el5 | All versions | 0:7.5.18-1.Final_redhat_1.1.ep6.el5 |
| `jboss-as-domain-http` | Red Hat:jboss_enterprise_application_platform:6::el5 | All versions | 0:7.5.18-1.Final_redhat_1.1.ep6.el5 |
| `jboss-as-domain-management` | Red Hat:jboss_enterprise_application_platform:6::el5 | All versions | 0:7.5.18-1.Final_redhat_1.1.ep6.el5 |
| `jboss-as-ee` | Red Hat:jboss_enterprise_application_platform:6::el5 | All versions | 0:7.5.18-1.Final_redhat_1.1.ep6.el5 |
| `jboss-as-ee-deployment` | Red Hat:jboss_enterprise_application_platform:6::el5 | All versions | 0:7.5.18-1.Final_redhat_1.1.ep6.el5 |
| `jboss-as-ejb3` | Red Hat:jboss_enterprise_application_platform:6::el5 | All versions | 0:7.5.18-1.Final_redhat_1.1.ep6.el5 |
| `jboss-as-embedded` | Red Hat:jboss_enterprise_application_platform:6::el5 | All versions | 0:7.5.18-1.Final_redhat_1.1.ep6.el5 |
| `jboss-as-host-controller` | Red Hat:jboss_enterprise_application_platform:6::el5 | All versions | 0:7.5.18-1.Final_redhat_1.1.ep6.el5 |
| `jboss-as-jacorb` | Red Hat:jboss_enterprise_application_platform:6::el5 | All versions | 0:7.5.18-1.Final_redhat_1.1.ep6.el5 |
| `jboss-as-jaxr` | Red Hat:jboss_enterprise_application_platform:6::el5 | All versions | 0:7.5.18-1.Final_redhat_1.1.ep6.el5 |
| `jboss-as-jaxrs` | Red Hat:jboss_enterprise_application_platform:6::el5 | All versions | 0:7.5.18-1.Final_redhat_1.1.ep6.el5 |
| `jboss-as-jdr` | Red Hat:jboss_enterprise_application_platform:6::el5 | All versions | 0:7.5.18-1.Final_redhat_1.1.ep6.el5 |
| `jboss-as-jmx` | Red Hat:jboss_enterprise_application_platform:6::el5 | All versions | 0:7.5.18-1.Final_redhat_1.1.ep6.el5 |
| `jboss-as-jpa` | Red Hat:jboss_enterprise_application_platform:6::el5 | All versions | 0:7.5.18-1.Final_redhat_1.1.ep6.el5 |
| `jboss-as-jsf` | Red Hat:jboss_enterprise_application_platform:6::el5 | All versions | 0:7.5.18-1.Final_redhat_1.1.ep6.el5 |
| `jboss-as-jsr77` | Red Hat:jboss_enterprise_application_platform:6::el5 | All versions | 0:7.5.18-1.Final_redhat_1.1.ep6.el5 |
| `jboss-as-logging` | Red Hat:jboss_enterprise_application_platform:6::el5 | All versions | 0:7.5.18-1.Final_redhat_1.1.ep6.el5 |
| `jboss-as-mail` | Red Hat:jboss_enterprise_application_platform:6::el5 | All versions | 0:7.5.18-1.Final_redhat_1.1.ep6.el5 |
| `jboss-as-management-client-content` | Red Hat:jboss_enterprise_application_platform:6::el5 | All versions | 0:7.5.18-1.Final_redhat_1.1.ep6.el5 |
| `jboss-as-messaging` | Red Hat:jboss_enterprise_application_platform:6::el5 | All versions | 0:7.5.18-1.Final_redhat_1.1.ep6.el5 |
| `jboss-as-modcluster` | Red Hat:jboss_enterprise_application_platform:6::el5 | All versions | 0:7.5.18-1.Final_redhat_1.1.ep6.el5 |
| `jboss-as-naming` | Red Hat:jboss_enterprise_application_platform:6::el5 | All versions | 0:7.5.18-1.Final_redhat_1.1.ep6.el5 |
| `jboss-as-network` | Red Hat:jboss_enterprise_application_platform:6::el5 | All versions | 0:7.5.18-1.Final_redhat_1.1.ep6.el5 |
| `jboss-as-osgi` | Red Hat:jboss_enterprise_application_platform:6::el5 | All versions | 0:7.5.18-1.Final_redhat_1.1.ep6.el5 |
| `jboss-as-osgi-configadmin` | Red Hat:jboss_enterprise_application_platform:6::el5 | All versions | 0:7.5.18-1.Final_redhat_1.1.ep6.el5 |
| `jboss-as-osgi-service` | Red Hat:jboss_enterprise_application_platform:6::el5 | All versions | 0:7.5.18-1.Final_redhat_1.1.ep6.el5 |

Products: Redhat Jboss Enterprise Application Platform, Redhat Keycloak.

## How do I fix CVE-2017-2582?

Upgrade org.keycloak:keycloak-core to 2.5.1 or later.

## Is CVE-2017-2582 being exploited?

There is no known exploitation of CVE-2017-2582 in the wild and no public exploit code.

## Other vulnerabilities in Redhat Jboss Enterprise Application Platform

- [CVE-2017-12149](https://insights.sbomify.com/CVE-2017-12149/): Red Hat JBoss Application Server Remote Code Execution (critical 9.8, exploited in the wild)
- [CVE-2010-1428](https://insights.sbomify.com/CVE-2010-1428/): Red Hat JBoss Information Disclosure (medium 5.9, exploited in the wild)
- [CVE-2010-0738](https://insights.sbomify.com/CVE-2010-0738/): Red Hat JBoss Authentication Bypass (low 3.7, exploited in the wild)
- [CVE-2016-3690](https://insights.sbomify.com/CVE-2016-3690/): Deserialization in n/a (critical 9.8)
- [CVE-2017-7504](https://insights.sbomify.com/CVE-2017-7504/): Deserialization in JBoss (critical 9.8)

## Fix prompt for AI coding agents

```text
Check this codebase for CVE-2017-2582 and fix it if it is affected.

What it is: CVE-2017-2582 is a medium-severity vulnerability in Redhat Jboss Enterprise Application Platform, published on 26 Jul 2018. Any signed-in user can exploit it over the network, with no action from the victim.
Exploitation: There is no known exploitation of CVE-2017-2582 in the wild and no public exploit code.

Affected packages and fixed versions:
- org.keycloak:keycloak-core (Maven): affected all versions; fixed in 2.5.1
- org.keycloak:keycloak-core (Maven): affected all versions; fixed in 2.5.1

Task:
1. Search the dependency manifests and lockfiles (for example package.json, package-lock.json, requirements.txt, poetry.lock, uv.lock, pom.xml, build.gradle, go.mod, Cargo.lock, Gemfile.lock) and any Dockerfiles for the affected packages, including transitive dependencies.
2. If an affected version is in use, upgrade it to the fixed version for its release line with the project's package manager, so the lockfile is regenerated. Prefer the smallest upgrade that fixes it.
3. If there is no fix, or the upgrade would break the build, do not guess: explain the risk and the safest workaround instead.
4. Run the tests and summarise what changed and why.
5. If nothing in the project is affected, say so and change nothing.

Reference: https://insights.sbomify.com/CVE-2017-2582/ (Markdown: https://insights.sbomify.com/CVE-2017-2582/index.md)
```

## Sources

- CVE record: https://www.cve.org/CVERecord?id=CVE-2017-2582
- NVD: https://nvd.nist.gov/vuln/detail/CVE-2017-2582
- OSV: https://osv.dev/vulnerability/CVE-2017-2582

---
From sbomify Insights: https://insights.sbomify.com/CVE-2017-2582/
Summaries are generated and may contain mistakes; the official description above is the record.
