# CVE-2023-28853: Mastodon's blind LDAP injection in login allows the attacker to leak arbitrary attributes from LDAP database

- Severity: High 7.7 (CVSS:3.1, scored by GitHub_M) `CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:C/C:H/I:N/A:N`
- Known to be exploited: not in CISA's catalogue, which lists only what CISA has confirmed
- Likelihood of exploitation in the next 30 days (EPSS): 1.28%, higher than 70% of CVEs (2026-12-01)
- Public exploit code or proof of concept: one link below, marked "exploit"
- Published: 2023-04-04T21:14:53.350Z
- Modified: 2026-09-10T16:01:42.696Z
- Also known as: BIT-MASTODON-2023-28853, GHSA-38g9-pfm9-gfqv
- Weaknesses: CWE-74, CWE-90
- SSVC (CISA-ADP): exploitation poc, automatable no, technical impact partial
- Assigned by: GitHub_M

## Description

Mastodon is a free, open-source social network server based on ActivityPub Mastodon allows configuration of LDAP for authentication. Starting in version 2.5.0 and prior to versions 3.5.8, 4.0.4, and 4.1.2, the LDAP query made during login is insecure and the attacker can perform LDAP injection attack to leak arbitrary attributes from LDAP database. This issue is fixed in versions 3.5.8, 4.0.4, and 4.1.2.

(As written by CVE List.)

## Affected

- mastodon mastodon: >= 2.5.0, < 3.5.8; >= 4.0.0, < 4.0.4; >= 4.1.0, < 4.1.2
- joinmastodon mastodon: from 2.5.0 before 3.5.8; from 4.0.0 before 4.0.4; from 4.1.0 before 4.1.2
- mastodon (Bitnami): from 2.5.0 before 3.5.8; from 4.0.0 before 4.0.4; from 4.1.0 before 4.1.2

## Every score

- GitHub_M: CVSS:3.1 7.7 High `CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:C/C:H/I:N/A:N`
- NVD: CVSS:3.1 6.5 Medium `CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:H/I:N/A:N`
- Bitnami Vulnerability Database: rating High

## References

- <https://github.com/mastodon/mastodon/security/advisories/GHSA-38g9-pfm9-gfqv> (exploit, advisory, vendor-advisory)
- <https://github.com/mastodon/mastodon/pull/24379> (fix, patch)
- <https://github.com/mastodon/mastodon/blob/94cbd808b5b3e7999c7e77dc724b7e8c9dd2bdec/app/models/concerns/ldap_authenticable.rb#L7-L14> (product, web)
- <https://github.com/mastodon/mastodon/blob/94cbd808b5b3e7999c7e77dc724b7e8c9dd2bdec/config/initializers/devise.rb#L398-L414> (product, web)
- <https://github.com/mastodon/mastodon/releases/tag/v3.5.8> (article, release-notes)
- <https://github.com/mastodon/mastodon/releases/tag/v4.0.4> (article, release-notes)
- <https://github.com/mastodon/mastodon/releases/tag/v4.1.2> (article, release-notes)
- <http://www.openwall.com/lists/oss-security/2023/07/06/6> (web)
- <https://nvd.nist.gov/vuln/detail/CVE-2023-28853> (web)

## Sources

- CVE List: [CVE-2023-28853](https://www.cve.org/CVERecord?id=CVE-2023-28853), CVE Terms of Use, modified 2025-02-13
- NVD: [CVE-2023-28853](https://nvd.nist.gov/vuln/detail/CVE-2023-28853), Public domain, modified 2026-06-17
- Bitnami Vulnerability Database: [BIT-MASTODON-2023-28853](https://osv.dev/vulnerability/BIT-MASTODON-2023-28853), Apache-2.0, modified 2026-09-10

---

Page: https://cve.day/CVE-2023-28853 · Whole record: https://cve.day/CVE-2023-28853.json · Rebuilt by cve.day 2026-11-25T22:58:23.081Z
