CVE-2023-52892: Phpseclib/phpseclib Name Confusion Vulnerability
HIGHCVE-2023-52892 is a HIGH (CVSS 7.5) name confusion vulnerability (CWE-436: Interpretation Conflict) affecting Phpseclib/phpseclib libraries in the Packagist ecosystem. The issue involves name confusion in x509 subject alternative name fields. Remediation is available by upgrading affected packages to version 1.0.22, 2.0.46, 3.0.33.
CVE-2023-52892 at a Glance
Security Impact
CVSS: 7.5
The security impact metrics below are parsed directly from the CVSS v3.1 vector string (CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:N/A:N).
How to Fix CVE-2023-52892
To remediate this vulnerability, upgrade all affected Phpseclib/phpseclib dependencies to a patched release. Both direct and transitive dependencies should be checked, as frameworks or security libraries may pull in vulnerable versions transitively.
Upgrade phpseclib/phpseclib to 1.0.22
Upgrade phpseclib/phpseclib to 2.0.46
Upgrade phpseclib/phpseclib to 3.0.33
Run the following command in your project directory to verify that all resolved dependencies use the patched release:
inspect dependencies for phpseclib/phpseclib
How to Check if You Are Affected
To determine whether your application is affected by CVE-2023-52892, inspect your project dependencies for Phpseclib/phpseclib:
inspect dependencies for phpseclib/phpseclib
Analyze the terminal output to locate any version of Phpseclib/phpseclib in your dependency tree. If any resolved version matches the vulnerable ranges listed in the table below (for example, versions earlier than 1.0.22), your application is affected.
Note: Verify declared build manifests and deployed runtime container environments.
Technical Details
Vulnerability Mechanism & Technical Analysis
This vulnerability is classified under CWE-436: Interpretation Conflict, where product a handles inputs or steps differently than product b, which causes a to perform incorrect actions based on its perception of b's state. In Phpseclib/phpseclib, software state validation or input boundaries are circumvented during processing. Review the official source advisory statement below for specific affected components, classes, and reproduction details.
Source Advisory Statement
CVE-2023-52892 Affected Phpseclib/phpseclib Versions
3 component(s)| Product / Package | Ecosystem | Affected Versions | Fixed Version |
|---|---|---|---|
|
phpseclib/phpseclib
|
Packagist |
< 1.0.22
|
1.0.22
|
|
phpseclib/phpseclib
|
Packagist |
≥ 2.0.0
< 2.0.46
|
2.0.46
|
|
phpseclib/phpseclib
|
Packagist |
≥ 3.0.0
< 3.0.33
|
3.0.33
|
References
Frequently Asked Questions
What is CVE-2023-52892?
Which Phpseclib/phpseclib versions are affected?
What version fixes CVE-2023-52892?
Is phpseclib/phpseclib affected?
What is the CVSS score of CVE-2023-52892?
What CWE is associated with CVE-2023-52892?
How can I check Packagist dependencies for CVE-2023-52892?
Machine-readable OSV JSON
OSV v1.5 Schema
{
"schema_version" : "1.4.0",
"id" : "GHSA-ff7q-6vwh-v9m4",
"modified" : "2024-06-28T18:57:31Z",
"published" : "2024-06-28T00:33:31Z",
"aliases" : [ "CVE-2023-52892" ],
"summary" : "Name confusion in x509 Subject Alternative Name fields",
"details" : "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.",
"severity" : [ {
"type" : "CVSS_V3",
"score" : "CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:N/A:N"
}, {
"type" : "CVSS_V4",
"score" : "CVSS:4.0/AV:N/AC:L/AT:N/PR:N/UI:N/VC:H/VI:N/VA:N/SC:N/SI:N/SA:N"
} ],
"affected" : [ {
"package" : {
"ecosystem" : "Packagist",
"name" : "phpseclib/phpseclib"
},
"ranges" : [ {
"type" : "ECOSYSTEM",
"events" : [ {
"introduced" : "0"
}, {
"fixed" : "1.0.22"
} ]
} ]
}, {
"package" : {
"ecosystem" : "Packagist",
"name" : "phpseclib/phpseclib"
},
"ranges" : [ {
"type" : "ECOSYSTEM",
"events" : [ {
"introduced" : "2.0.0"
}, {
"fixed" : "2.0.46"
} ]
} ]
}, {
"package" : {
"ecosystem" : "Packagist",
"name" : "phpseclib/phpseclib"
},
"ranges" : [ {
"type" : "ECOSYSTEM",
"events" : [ {
"introduced" : "3.0.0"
}, {
"fixed" : "3.0.33"
} ]
} ]
} ],
"references" : [ {
"type" : "ADVISORY",
"url" : "https://nvd.nist.gov/vuln/detail/CVE-2023-52892"
}, {
"type" : "WEB",
"url" : "https://github.com/phpseclib/phpseclib/issues/1943"
}, {
"type" : "WEB",
"url" : "https://github.com/phpseclib/phpseclib/commit/6cd6e8ceab9f2b55c8cd81d2192bf98cbeaf4627"
}, {
"type" : "PACKAGE",
"url" : "https://github.com/phpseclib/phpseclib"
}, {
"type" : "WEB",
"url" : "https://github.com/phpseclib/phpseclib/releases/tag/3.0.33"
}, {
"type" : "WEB",
"url" : "https://github.com/x509-name-testing/name_testing_artifacts"
} ],
"database_specific" : {
"cwe_ids" : [ "CWE-436" ],
"severity" : "HIGH",
"github_reviewed" : true,
"github_reviewed_at" : "2024-06-28T18:57:31Z",
"nvd_published_at" : "2024-06-27T22:15:10Z"
}
}