# CVE-2022-47950: OpenStack Swift XML external entities (XXE) Injection

> Authenticated users can read arbitrary files from the host server via crafted XML requests in the S3 API, exposing sensitive data.

- **Severity:** Medium 6.5 (`CVSS:3.1/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:** 18 Jan 2023
- **Updated:** 4 Apr 2025
- **Also known as:** DEBIAN-CVE-2022-47950, DLA-3281-1, DSA-5327-1, GHSA-274c-rx2j-2v3x, PYSEC-2026-927, RHSA-2023:1013, RHSA-2023:1277, SUSE-SU-2023:0323-1, UBUNTU-CVE-2022-47950, USN-5852-1

## What is CVE-2022-47950?

CVE-2022-47950 is a medium-severity path traversal vulnerability in Debian Debian Linux, published on 18 Jan 2023. Any signed-in user can exploit it over the network, with no action from the victim.

### Official description

An issue was discovered in OpenStack Swift before 2.28.1, 2.29.x before 2.29.2, and 2.30.0. By supplying crafted XML files, an authenticated user may coerce the S3 API into returning arbitrary file contents from the host server, resulting in unauthorized read access to potentially sensitive data. This impacts both s3api deployments (Rocky or later), and swift3 deployments (Queens and earlier, no longer actively developed).

Weakness: CWE-552 (Files or Directories Accessible to External Parties)

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

7 open source packages ship an affected version, including swift. It affects 2 products.


| Package | Ecosystem | Affected | Fixed in |
| --- | --- | --- | --- |
| `swift` | PyPI | All versions | 2.28.1, 2.29.2, 2.30.1 |
| `swift` | PyPI | All versions | 2.28.1 |
| `swift` | PyPI | All versions | 2.28.1 |
| `swift` | PyPI | From 2.29.0 | 2.29.2 |
| `swift` | PyPI | From 2.29.0 | 2.29.2 |
| `swift` | PyPI | From 2.30.0 | 2.30.1 |
| `swift` | PyPI | From 2.30.0 | 2.30.1 |
| `openstack-swift-plugin-swift3` | Red Hat:openstack:13::el7 | All versions | 0:1.12.1-1.el7ost |
| `openstack-swift` | Red Hat:openstack:16.1::el8 | All versions | 0:2.23.2-1.20230201163512.eef87ee.el8ost |
| `openstack-swift-account` | Red Hat:openstack:16.1::el8 | All versions | 0:2.23.2-1.20230201163512.eef87ee.el8ost |
| `openstack-swift-container` | Red Hat:openstack:16.1::el8 | All versions | 0:2.23.2-1.20230201163512.eef87ee.el8ost |
| `openstack-swift-object` | Red Hat:openstack:16.1::el8 | All versions | 0:2.23.2-1.20230201163512.eef87ee.el8ost |
| `openstack-swift-proxy` | Red Hat:openstack:16.1::el8 | All versions | 0:2.23.2-1.20230201163512.eef87ee.el8ost |
| `python3-swift` | Red Hat:openstack:16.1::el8 | All versions | 0:2.23.2-1.20230201163512.eef87ee.el8ost |
| `openstack-swift` | Red Hat:openstack:16.2::el8 | All versions | 0:2.23.4-2.20220422185313.2829195.el8ost |
| `openstack-swift-account` | Red Hat:openstack:16.2::el8 | All versions | 0:2.23.4-2.20220422185313.2829195.el8ost |
| `openstack-swift-container` | Red Hat:openstack:16.2::el8 | All versions | 0:2.23.4-2.20220422185313.2829195.el8ost |
| `openstack-swift-object` | Red Hat:openstack:16.2::el8 | All versions | 0:2.23.4-2.20220422185313.2829195.el8ost |
| `openstack-swift-proxy` | Red Hat:openstack:16.2::el8 | All versions | 0:2.23.4-2.20220422185313.2829195.el8ost |
| `python3-swift` | Red Hat:openstack:16.2::el8 | All versions | 0:2.23.4-2.20220422185313.2829195.el8ost |
| `openstack-swift` | Red Hat:openstack:17.0::el9 | All versions | 0:2.27.1-0.20230201120900.6a1a8ce.el9ost |
| `openstack-swift-account` | Red Hat:openstack:17.0::el9 | All versions | 0:2.27.1-0.20230201120900.6a1a8ce.el9ost |
| `openstack-swift-container` | Red Hat:openstack:17.0::el9 | All versions | 0:2.27.1-0.20230201120900.6a1a8ce.el9ost |
| `openstack-swift-object` | Red Hat:openstack:17.0::el9 | All versions | 0:2.27.1-0.20230201120900.6a1a8ce.el9ost |
| `openstack-swift-proxy` | Red Hat:openstack:17.0::el9 | All versions | 0:2.27.1-0.20230201120900.6a1a8ce.el9ost |
| `python3-swift` | Red Hat:openstack:17.0::el9 | All versions | 0:2.27.1-0.20230201120900.6a1a8ce.el9ost |
| `python-swift3` | SUSE:HPE Helion OpenStack 8 | All versions | 1.7.0.dev372-3.3.1 |
| `python-swift3` | SUSE:OpenStack Cloud 8 | All versions | 1.7.0.dev372-3.3.1 |
| `python-swift3` | SUSE:OpenStack Cloud Crowbar 8 | All versions | 1.7.0.dev372-3.3.1 |

Products: Debian Debian Linux, Openstack Swift.

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

Upgrade swift to a fixed version for your release line: 2.28.1, 2.29.2 or 2.30.1.

## Is CVE-2022-47950 being exploited?

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

## Other vulnerabilities in Debian Debian Linux

- [CVE-2015-3306](https://insights.sbomify.com/CVE-2015-3306/): ProFTPD Improper Access Control (critical 10.0, exploited in the wild)
- [CVE-2025-49113](https://insights.sbomify.com/CVE-2025-49113/): RoundCube Webmail Deserialization of Untrusted Data (critical 9.9, exploited in the wild)
- [CVE-2026-24061](https://insights.sbomify.com/CVE-2026-24061/): GNU InetUtils Argument Injection (critical 9.8, exploited in the wild)
- [CVE-2025-39682](https://insights.sbomify.com/CVE-2025-39682/): Linux Kernel Improper Check for Unusual or Exceptional Conditions (critical 9.8, exploited in the wild)
- [CVE-2024-9680](https://insights.sbomify.com/CVE-2024-9680/): Mozilla Firefox Use-After-Free (critical 9.8, exploited in the wild)

## Fix prompt for AI coding agents

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

What it is: CVE-2022-47950 is a medium-severity path traversal vulnerability in Debian Debian Linux, published on 18 Jan 2023. Any signed-in user can exploit it over the network, with no action from the victim.
Exploitation: There is no known exploitation of CVE-2022-47950 in the wild and no public exploit code.

Affected packages and fixed versions:
- swift (PyPI): affected all versions; fixed in 2.28.1, 2.29.2, 2.30.1
- swift (PyPI): affected all versions; fixed in 2.28.1
- swift (PyPI): affected all versions; fixed in 2.28.1
- swift (PyPI): affected from 2.29.0; fixed in 2.29.2
- swift (PyPI): affected from 2.29.0; fixed in 2.29.2
- swift (PyPI): affected from 2.30.0; fixed in 2.30.1
- swift (PyPI): affected from 2.30.0; fixed in 2.30.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-2022-47950/ (Markdown: https://insights.sbomify.com/CVE-2022-47950/index.md)
```

## Sources

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

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