# CVE-2023-5992: Opensc: side-channel leaks while stripping encryption pkcs#1 padding

> OpenSC fails to implement side-channel resistant PKCS#1 padding removal, potentially leaking private data to attackers.

- **Severity:** Medium 5.6 (`CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:L/I:L/A:L`)
- **Exploited in the wild:** Not known
- **Login needed:** Not needed
- **Attackable:** Over the internet
- **Victim action needed:** Not needed
- **Fix available:** Yes
- **Published:** 31 Jan 2024
- **Updated:** 6 Nov 2025
- **Also known as:** ALSA-2024:0966, ALSA-2024:0967, AZL-34088, AZL-35077, BELL-CVE-2023-5992, DEBIAN-CVE-2023-5992, GHSA-554m-v42f-hcq9, MGASA-2024-0101, RHSA-2024:0966, RHSA-2024:0967, RLSA-2024:0966, RLSA-2024:0967, SUSE-SU-2024:1402-1, SUSE-SU-2024:1402-2, SUSE-SU-2024:1625-1, SUSE-SU-2024:1773-1, SUSE-SU-2025:02754-1, SUSE-SU-2025:20530-1, UBUNTU-CVE-2023-5992, openSUSE-SU-2024:13765-1

## What is CVE-2023-5992?

CVE-2023-5992 is a medium-severity vulnerability in Opensc Project Opensc, published on 31 Jan 2024. An attacker can exploit it over the internet without logging in, with no action from the victim.

### Official description

A vulnerability was found in OpenSC where PKCS#1 encryption padding removal is not implemented as side-channel resistant. This issue may result in the potential leak of private data.

Weakness: CWE-203 (Observable Discrepancy)

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

It affects 11 products.


| Package | Ecosystem | Affected | Fixed in |
| --- | --- | --- | --- |
| `opensc` | AlmaLinux:8 | All versions | 0.20.0-8.el8_9 |
| `opensc` | AlmaLinux:9 | All versions | 0.23.0-4.el9_3 |
| `opensc` | Red Hat:enterprise_linux:8::baseos | All versions | 0:0.20.0-8.el8_9 |
| `opensc-debuginfo` | Red Hat:enterprise_linux:8::baseos | All versions | 0:0.20.0-8.el8_9 |
| `opensc-debugsource` | Red Hat:enterprise_linux:8::baseos | All versions | 0:0.20.0-8.el8_9 |
| `opensc` | Red Hat:enterprise_linux:9::baseos | All versions | 0:0.23.0-4.el9_3 |
| `opensc-debuginfo` | Red Hat:enterprise_linux:9::baseos | All versions | 0:0.23.0-4.el9_3 |
| `opensc-debugsource` | Red Hat:enterprise_linux:9::baseos | All versions | 0:0.23.0-4.el9_3 |
| `opensc` | Rocky Linux:8 | All versions | 0:0.20.0-8.el8_9 |
| `opensc` | Rocky Linux:9 | All versions | 0:0.23.0-4.el9_3 |
| `opensc` | SUSE:Linux Enterprise Micro 5.1 | All versions | 0.19.0-150100.3.28.1 |
| `opensc` | SUSE:Linux Enterprise Micro 5.2 | All versions | 0.19.0-150100.3.28.1 |
| `opensc` | SUSE:Linux Enterprise Micro 5.3 | All versions | 0.22.0-150400.3.9.1 |
| `opensc` | SUSE:Linux Enterprise Micro 5.4 | All versions | 0.22.0-150400.3.9.1 |
| `opensc` | SUSE:Linux Enterprise Micro 5.5 | All versions | 0.22.0-150400.3.9.1 |
| `opensc` | SUSE:Linux Enterprise Micro 5.5 | All versions | 0.22.0-150400.3.9.1 |
| `opensc` | SUSE:Linux Enterprise Module for Basesystem 15 SP5 | All versions | 0.22.0-150400.3.9.1 |
| `opensc` | SUSE:Linux Enterprise Module for Basesystem 15 SP6 | All versions | 0.22.0-150600.11.6.1 |
| `opensc` | SUSE:Linux Enterprise Module for Basesystem 15 SP7 | All versions | 0.22.0-150600.11.6.1 |
| `opensc` | SUSE:Linux Enterprise Server 12 SP5 | All versions | 0.13.0-3.28.1 |
| `opensc` | SUSE:Linux Enterprise Server for SAP Applications 12 SP5 | All versions | 0.13.0-3.28.1 |
| `opensc` | SUSE:Linux Micro 6.0 | All versions | 0.24.0-4.1 |
| `opensc` | openSUSE:Leap 15.5 | All versions | 0.22.0-150400.3.9.1 |
| `opensc` | openSUSE:Leap 15.6 | All versions | 0.22.0-150600.11.6.1 |
| `opensc` | openSUSE:Leap Micro 5.3 | All versions | 0.22.0-150400.3.9.1 |
| `opensc` | openSUSE:Leap Micro 5.4 | All versions | 0.22.0-150400.3.9.1 |

Products: Opensc Project Opensc, Redhat Enterprise Linux, Redhat Enterprise Linux Eus, Redhat Enterprise Linux for Arm 64, Redhat Enterprise Linux for Arm 64 Eus, Redhat Enterprise Linux for Ibm Z Systems, Redhat Enterprise Linux for Ibm Z Systems Eus, Redhat Enterprise Linux for Power Little Endian, Redhat Enterprise Linux for Power Little Endian Eus, Redhat Enterprise Linux Server Aus, Redhat Enterprise Linux Server for Power Little Endian Update Services for Sap Solutions.

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

Apply the vendor's patch.

## Is CVE-2023-5992 being exploited?

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

## Other vulnerabilities in Opensc Project Opensc

- [CVE-2021-34193](https://insights.sbomify.com/CVE-2021-34193/): Memory corruption in n/a (high 7.5)
- [CVE-2019-16058](https://insights.sbomify.com/CVE-2019-16058/): Memory corruption in n/a (high 7.5)
- [CVE-2019-6502](https://insights.sbomify.com/CVE-2019-6502/): Denial of service in n/a (high 7.5)
- [CVE-2023-2977](https://insights.sbomify.com/CVE-2023-2977/): Memory corruption in OpenSC (high 7.1)
- [CVE-2019-20792](https://insights.sbomify.com/CVE-2019-20792/): Use after free in n/a (medium 6.8)

## Fix prompt for AI coding agents

```text
Check this codebase for CVE-2023-5992 and fix it if it is affected.

What it is: CVE-2023-5992 is a medium-severity vulnerability in Opensc Project Opensc, published on 31 Jan 2024. An attacker can exploit it over the internet without logging in, with no action from the victim.
Exploitation: There is no known exploitation of CVE-2023-5992 in the wild and no public exploit code.

Affected product: Opensc Project Opensc. 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-2023-5992/ (Markdown: https://insights.sbomify.com/CVE-2023-5992/index.md)
```

## Sources

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

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