# CVE-2022-24407: SQL injection in n/a

> Attackers can inject SQL commands via unescaped passwords in Cyrus SASL, potentially modifying or reading database contents.

- **Severity:** High 8.8 (`CVSS:3.1/AV:N/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:** Over the internet
- **Victim action needed:** Not needed
- **Fix available:** Yes
- **Published:** 23 Feb 2022
- **Updated:** 14 Oct 2026
- **Also known as:** ALPINE-CVE-2022-24407, ALSA-2022:0658, AZL-8794, CLEANSTART-2024-DV01565, CLSA-2022-1646060576, CLSA-2022-1646060797, CLSA-2022-1646061219, CLSA-2022-1646061262, CLSA-2022-1646061301, DEBIAN-CVE-2022-24407, DLA-2931-1, DSA-5087-1, GHSA-fvc5-cffp-h22w, MGASA-2022-0111, MGASA-2023-0095, OESA-2022-1557, RHSA-2022:0658, RHSA-2022:0666, RHSA-2022:0668, RHSA-2022:0730, RHSA-2022:0731, RHSA-2022:0780, RLSA-2022:0658, SUSE-SU-2022:0653-1, SUSE-SU-2022:0693-1, SUSE-SU-2022:0702-1, SUSE-SU-2022:0743-1, SUSE-SU-2022:0743-2, SUSE-SU-2022:14894-1, UBUNTU-CVE-2022-24407, USN-5301-1, USN-5301-2, openSUSE-SU-2022:0743-1, openSUSE-SU-2024:11949-1

## What is CVE-2022-24407?

CVE-2022-24407 is a high-severity SQL injection vulnerability in Debian Debian Linux, published on 23 Feb 2022. Any signed-in user can exploit it over the network, with no action from the victim.

### Official description

In Cyrus SASL 2.1.17 through 2.1.27 before 2.1.28, plugins/sql.c does not escape the password for a SQL INSERT or UPDATE statement.

Weakness: CWE-89 (Improper Neutralization of Special Elements used in an SQL Command)

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

It affects 8 products.


| Package | Ecosystem | Affected | Fixed in |
| --- | --- | --- | --- |
| `cyrus-sasl` | AlmaLinux:8 | All versions | 2.1.27-6.el8_5 |
| `cyrus-sasl-devel` | AlmaLinux:8 | All versions | 2.1.27-6.el8_5 |
| `cyrus-sasl-gs2` | AlmaLinux:8 | All versions | 2.1.27-6.el8_5 |
| `cyrus-sasl-gssapi` | AlmaLinux:8 | All versions | 2.1.27-6.el8_5 |
| `cyrus-sasl-ldap` | AlmaLinux:8 | All versions | 2.1.27-6.el8_5 |
| `cyrus-sasl-lib` | AlmaLinux:8 | All versions | 2.1.27-6.el8_5 |
| `cyrus-sasl-md5` | AlmaLinux:8 | All versions | 2.1.27-6.el8_5 |
| `cyrus-sasl-ntlm` | AlmaLinux:8 | All versions | 2.1.27-6.el8_5 |
| `cyrus-sasl-plain` | AlmaLinux:8 | All versions | 2.1.27-6.el8_5 |
| `cyrus-sasl-scram` | AlmaLinux:8 | All versions | 2.1.27-6.el8_5 |
| `cyrus-sasl-sql` | AlmaLinux:8 | All versions | 2.1.27-6.el8_5 |
| `cyrus-sasl` | Red Hat:enterprise_linux:7::client | All versions | 0:2.1.26-24.el7_9 |
| `cyrus-sasl-debuginfo` | Red Hat:enterprise_linux:7::client | All versions | 0:2.1.26-24.el7_9 |
| `cyrus-sasl-devel` | Red Hat:enterprise_linux:7::client | All versions | 0:2.1.26-24.el7_9 |
| `cyrus-sasl-gs2` | Red Hat:enterprise_linux:7::client | All versions | 0:2.1.26-24.el7_9 |
| `cyrus-sasl-gssapi` | Red Hat:enterprise_linux:7::client | All versions | 0:2.1.26-24.el7_9 |
| `cyrus-sasl-ldap` | Red Hat:enterprise_linux:7::client | All versions | 0:2.1.26-24.el7_9 |
| `cyrus-sasl-lib` | Red Hat:enterprise_linux:7::client | All versions | 0:2.1.26-24.el7_9 |
| `cyrus-sasl-md5` | Red Hat:enterprise_linux:7::client | All versions | 0:2.1.26-24.el7_9 |
| `cyrus-sasl-ntlm` | Red Hat:enterprise_linux:7::client | All versions | 0:2.1.26-24.el7_9 |
| `cyrus-sasl-plain` | Red Hat:enterprise_linux:7::client | All versions | 0:2.1.26-24.el7_9 |
| `cyrus-sasl-scram` | Red Hat:enterprise_linux:7::client | All versions | 0:2.1.26-24.el7_9 |
| `cyrus-sasl-sql` | Red Hat:enterprise_linux:7::client | All versions | 0:2.1.26-24.el7_9 |
| `cyrus-sasl` | Red Hat:enterprise_linux:7::computenode | All versions | 0:2.1.26-24.el7_9 |
| `cyrus-sasl-debuginfo` | Red Hat:enterprise_linux:7::computenode | All versions | 0:2.1.26-24.el7_9 |
| `cyrus-sasl-devel` | Red Hat:enterprise_linux:7::computenode | All versions | 0:2.1.26-24.el7_9 |
| `cyrus-sasl-gs2` | Red Hat:enterprise_linux:7::computenode | All versions | 0:2.1.26-24.el7_9 |
| `cyrus-sasl-ldap` | Red Hat:enterprise_linux:7::computenode | All versions | 0:2.1.26-24.el7_9 |
| `cyrus-sasl-ntlm` | Red Hat:enterprise_linux:7::computenode | All versions | 0:2.1.26-24.el7_9 |
| `cyrus-sasl-scram` | Red Hat:enterprise_linux:7::computenode | All versions | 0:2.1.26-24.el7_9 |
| `cyrus-sasl-sql` | Red Hat:enterprise_linux:7::computenode | All versions | 0:2.1.26-24.el7_9 |
| `cyrus-sasl` | Red Hat:enterprise_linux:7::server | All versions | 0:2.1.26-24.el7_9 |
| `cyrus-sasl-debuginfo` | Red Hat:enterprise_linux:7::server | All versions | 0:2.1.26-24.el7_9 |
| `cyrus-sasl-devel` | Red Hat:enterprise_linux:7::server | All versions | 0:2.1.26-24.el7_9 |
| `cyrus-sasl-gs2` | Red Hat:enterprise_linux:7::server | All versions | 0:2.1.26-24.el7_9 |
| `cyrus-sasl-gssapi` | Red Hat:enterprise_linux:7::server | All versions | 0:2.1.26-24.el7_9 |
| `cyrus-sasl-ldap` | Red Hat:enterprise_linux:7::server | All versions | 0:2.1.26-24.el7_9 |
| `cyrus-sasl-lib` | Red Hat:enterprise_linux:7::server | All versions | 0:2.1.26-24.el7_9 |
| `cyrus-sasl-md5` | Red Hat:enterprise_linux:7::server | All versions | 0:2.1.26-24.el7_9 |
| `cyrus-sasl-ntlm` | Red Hat:enterprise_linux:7::server | All versions | 0:2.1.26-24.el7_9 |

Products: Cyrusimap Cyrus-Sasl, Debian Debian Linux, Fedoraproject Fedora, Netapp Active Iq Unified Manager, Netapp Ontap Select Deploy Administration Utility, Oracle Communications Cloud Native Core Console, Oracle Communications Cloud Native Core Network Function Cloud Native Environment, Oracle Communications Cloud Native Core Security Edge Protection Proxy.

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

Upgrade to a fixed version.

## Is CVE-2022-24407 being exploited?

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

## Fix prompt for AI coding agents

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

What it is: CVE-2022-24407 is a high-severity SQL injection vulnerability in Debian Debian Linux, published on 23 Feb 2022. 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-24407 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-24407/ (Markdown: https://insights.sbomify.com/CVE-2022-24407/index.md)
```

## Sources

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

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