# CVE-2023-45145: Redis Unix-domain socket may have be exposed with the wrong permissions for a short time window.

> A race condition during Redis startup may expose Unix sockets with incorrect permissions, allowing unauthorized connections if a permissive umask is used.

- **Severity:** Low 3.6 (`CVSS:3.1/AV:L/AC:H/PR:L/UI:N/S:U/C:L/I:L/A:N`)
- **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:** 18 Oct 2023
- **Updated:** 13 Feb 2025
- **Also known as:** ALPINE-CVE-2023-45145, AZL-31653, BELL-CVE-2023-45145, BIT-keydb-2023-45145, BIT-redis-2023-45145, BIT-valkey-2023-45145, CLEANSTART-2026-SM76427, DEBIAN-CVE-2023-45145, DLA-3627-1, GHSA-ghmp-889m-7cvx, MGASA-2023-0301, SUSE-SU-2023:4290-1, SUSE-SU-2023:4376-1, SUSE-SU-2024:0200-1, UBUNTU-CVE-2023-45145

## What is CVE-2023-45145?

CVE-2023-45145 is a low-severity vulnerability in Debian Debian Linux, published on 18 Oct 2023. It can only be exploited from the same machine or local network, with no action from the victim.

### Official description

Redis is an in-memory database that persists on disk. On startup, Redis begins listening on a Unix socket before adjusting its permissions to the user-provided configuration. If a permissive umask(2) is used, this creates a race condition that enables, during a short period of time, another process to establish an otherwise unauthorized connection. This problem has existed since Redis 2.6.0-RC1. This issue has been addressed in Redis versions 7.2.2, 7.0.14 and 6.2.14. Users are advised to upgrade. For users unable to upgrade, it is possible to work around the problem by disabling Unix sockets, starting Redis with a restrictive umask, or storing the Unix socket file in a protected directory.

Weakness: CWE-668 (Exposure of Resource to Wrong Sphere)

## Which versions are affected by CVE-2023-45145?

3 open source packages ship an affected version, including keydb, redis and valkey. It affects 3 products.


| Package | Ecosystem | Affected | Fixed in |
| --- | --- | --- | --- |
| `keydb` | Bitnami | From 2.6.0 | 6.2.14, 7.0.14, 7.2.2 |
| `redis` | Bitnami | From 2.6.0 | 6.2.14, 7.0.14, 7.2.2 |
| `valkey` | Bitnami | From 2.6.0 | 6.2.14, 7.0.14, 7.2.2 |
| `redis` | SUSE:Enterprise Storage 7.1 | All versions | 6.0.14-150200.6.29.1 |
| `redis` | SUSE:Linux Enterprise High Performance Computing 15 SP2-LTSS | All versions | 6.0.14-150200.6.29.1 |
| `redis` | SUSE:Linux Enterprise High Performance Computing 15 SP3-ESPOS | All versions | 6.0.14-150200.6.29.1 |
| `redis` | SUSE:Linux Enterprise High Performance Computing 15 SP3-LTSS | All versions | 6.0.14-150200.6.29.1 |
| `redis` | SUSE:Linux Enterprise Module for Server Applications 15 SP4 | All versions | 6.2.6-150400.3.25.1 |
| `redis` | SUSE:Linux Enterprise Module for Server Applications 15 SP5 | All versions | 6.2.6-150400.3.25.1 |
| `redis7` | SUSE:Linux Enterprise Module for Server Applications 15 SP5 | All versions | 7.0.8-150500.3.9.1 |
| `redis` | SUSE:Linux Enterprise Server 15 SP2-LTSS | All versions | 6.0.14-150200.6.29.1 |
| `redis` | SUSE:Linux Enterprise Server 15 SP3-LTSS | All versions | 6.0.14-150200.6.29.1 |
| `redis` | SUSE:Linux Enterprise Server for SAP Applications 15 SP2 | All versions | 6.0.14-150200.6.29.1 |
| `redis` | SUSE:Linux Enterprise Server for SAP Applications 15 SP3 | All versions | 6.0.14-150200.6.29.1 |
| `redis` | SUSE:Manager Proxy 4.2 | All versions | 6.0.14-150200.6.29.1 |
| `redis` | SUSE:Manager Server 4.2 | All versions | 6.0.14-150200.6.29.1 |
| `redis` | openSUSE:Leap 15.4 | All versions | 6.2.6-150400.3.25.1 |
| `redis` | openSUSE:Leap 15.5 | All versions | 6.2.6-150400.3.25.1 |
| `redis7` | openSUSE:Leap 15.5 | All versions | 7.0.8-150500.3.9.1 |

Products: Debian Debian Linux, Fedoraproject Fedora, Redis Redis.

## How do I fix CVE-2023-45145?

Upgrade keydb to a fixed version for your release line: 6.2.14, 7.0.14 or 7.2.2.

## Is CVE-2023-45145 being exploited?

There is no known exploitation of CVE-2023-45145 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-2023-45145 and fix it if it is affected.

What it is: CVE-2023-45145 is a low-severity vulnerability in Debian Debian Linux, published on 18 Oct 2023. 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-2023-45145 in the wild and no public exploit code.

Affected packages and fixed versions:
- keydb (Bitnami): affected from 2.6.0; fixed in 6.2.14, 7.0.14, 7.2.2
- redis (Bitnami): affected from 2.6.0; fixed in 6.2.14, 7.0.14, 7.2.2
- valkey (Bitnami): affected from 2.6.0; fixed in 6.2.14, 7.0.14, 7.2.2

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

## Sources

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

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