# CVE-2022-2735: Privilege escalation in ClusterLabs/pcs

> Incorrect Unix socket permissions in PCS allow local attackers to escalate privileges to hacluster, gaining full control over the managed cluster.

- **Severity:** High 7.8 (`CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H`)
- **Exploited in the wild:** Not known
- **Login needed:** Any signed-in user
- **Attackable:** Local or same network only
- **Victim action needed:** Not needed
- **Fix available:** Yes
- **Published:** 6 Sep 2022
- **Updated:** 3 Aug 2024
- **Also known as:** ALSA-2022:6313, ALSA-2022:6314, DEBIAN-CVE-2022-2735, GHSA-7xr9-rmm4-cq6v, OESA-2022-1961, RHSA-2022:6312, RHSA-2022:6313, RHSA-2022:6314, RHSA-2022:6341, RLSA-2022:6313, RLSA-2022:6314, UBUNTU-CVE-2022-2735

## What is CVE-2022-2735?

CVE-2022-2735 is a high-severity vulnerability in Debian Debian Linux, published on 6 Sep 2022. It can only be exploited from the same machine or local network, with no action from the victim.

### Official description

A vulnerability was found in the PCS project. This issue occurs due to incorrect permissions on a Unix socket used for internal communication between PCS daemons. A privilege escalation could happen by obtaining an authentication token for a hacluster user. With the "hacluster" token, this flaw allows an attacker to have complete control over the cluster managed by PCS.

Weakness: CWE-276 (Incorrect Default Permissions)

## Which versions are affected by CVE-2022-2735?

It affects 2 products.


| Package | Ecosystem | Affected | Fixed in |
| --- | --- | --- | --- |
| `pcs` | AlmaLinux:8 | All versions | 0.10.12-6.el8_6.2.alma |
| `pcs-snmp` | AlmaLinux:8 | All versions | 0.10.12-6.el8_6.2.alma |
| `pcs` | AlmaLinux:9 | All versions | 0.11.1-10.el9_0.2 |
| `pcs-snmp` | AlmaLinux:9 | All versions | 0.11.1-10.el9_0.2 |
| `pcs` | Red Hat:enterprise_linux:8::highavailability | All versions | 0:0.10.12-6.el8_6.2 |
| `pcs-snmp` | Red Hat:enterprise_linux:8::highavailability | All versions | 0:0.10.12-6.el8_6.2 |
| `pcs` | Red Hat:enterprise_linux:8::resilientstorage | All versions | 0:0.10.12-6.el8_6.2 |
| `pcs-snmp` | Red Hat:enterprise_linux:8::resilientstorage | All versions | 0:0.10.12-6.el8_6.2 |
| `pcs` | Red Hat:enterprise_linux:9::highavailability | All versions | 0:0.11.1-10.el9_0.2 |
| `pcs-snmp` | Red Hat:enterprise_linux:9::highavailability | All versions | 0:0.11.1-10.el9_0.2 |
| `pcs` | Red Hat:enterprise_linux:9::resilientstorage | All versions | 0:0.11.1-10.el9_0.2 |
| `pcs-snmp` | Red Hat:enterprise_linux:9::resilientstorage | All versions | 0:0.11.1-10.el9_0.2 |
| `pcs` | Red Hat:rhel_eus:8.2::highavailability | All versions | 0:0.10.4-6.el8_2.3 |
| `pcs-snmp` | Red Hat:rhel_eus:8.2::highavailability | All versions | 0:0.10.4-6.el8_2.3 |
| `pcs` | Red Hat:rhel_eus:8.2::resilientstorage | All versions | 0:0.10.4-6.el8_2.3 |
| `pcs-snmp` | Red Hat:rhel_eus:8.2::resilientstorage | All versions | 0:0.10.4-6.el8_2.3 |
| `pcs` | Red Hat:rhel_eus:8.4::highavailability | All versions | 0:0.10.8-1.el8_4.2 |
| `pcs-snmp` | Red Hat:rhel_eus:8.4::highavailability | All versions | 0:0.10.8-1.el8_4.2 |
| `pcs` | Red Hat:rhel_eus:8.4::resilientstorage | All versions | 0:0.10.8-1.el8_4.2 |
| `pcs-snmp` | Red Hat:rhel_eus:8.4::resilientstorage | All versions | 0:0.10.8-1.el8_4.2 |
| `pcs` | Rocky Linux:8 | All versions | 0:0.10.12-6.el8_6.2 |
| `pcs` | Rocky Linux:9 | All versions | 0:0.11.1-10.el9_0.2 |

Products: Clusterlabs Pcs, Debian Debian Linux.

## How do I fix CVE-2022-2735?

Apply the vendor's patch.

## Is CVE-2022-2735 being exploited?

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

## Other vulnerabilities in Debian Debian Linux

- [CVE-2023-2319](https://insights.sbomify.com/CVE-2023-2319/): It was discovered that an update for PCS package in RHBA-2023:2151 erratum released as part of Red Hat Enterprise Linux 9.2 failed to includ (critical 9.8)
- [CVE-2022-1049](https://insights.sbomify.com/CVE-2022-1049/): Auth bypass in clusterlabs/pcs (high 8.8)
- [CVE-2016-0720](https://insights.sbomify.com/CVE-2016-0720/): Cross-site request forgery in n/a (high 8.8)
- [CVE-2016-0721](https://insights.sbomify.com/CVE-2016-0721/): Other in n/a (high 8.1)
- [CVE-2017-2661](https://insights.sbomify.com/CVE-2017-2661/): Cross-site scripting in pcs (medium 6.1)

## Fix prompt for AI coding agents

```text
Check this codebase for CVE-2022-2735 and fix it if it is affected.

What it is: CVE-2022-2735 is a high-severity vulnerability in Debian Debian Linux, published on 6 Sep 2022. It can only be exploited from the same machine or local network, with no action from the victim.
Exploitation: There is no known exploitation of CVE-2022-2735 in the wild and no public exploit code.

Affected product: Debian Debian Linux. No package-level version data is available, so check the vendor advisory linked from the reference page.

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-2022-2735/ (Markdown: https://insights.sbomify.com/CVE-2022-2735/index.md)
```

## Sources

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

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