Lookup for vulnerable packages by Package URL.

Purlpkg:composer/phpseclib/phpseclib@2.0.0
Typecomposer
Namespacephpseclib
Namephpseclib
Version2.0.0
Qualifiers
Subpath
Is_vulnerabletrue
Next_non_vulnerable_version2.0.47
Latest_non_vulnerable_version3.0.51
Affected_by_vulnerabilities
0
url VCID-6xjw-f9xu-fkg8
vulnerability_id VCID-6xjw-f9xu-fkg8
summary
phpseclib a large prime can cause a denial of service
An issue was discovered in phpseclib 1.x before 1.0.23, 2.x before 2.0.47, and 3.x before 3.0.36. An attacker can construct a malformed certificate containing an extremely large prime to cause a denial of service (CPU consumption for an isPrime primality check). NOTE: this issue was introduced when attempting to fix CVE-2023-27560.
references
0
reference_url https://api.first.org/data/v1/epss?cve=CVE-2024-27354
reference_id
reference_type
scores
0
value 0.00204
scoring_system epss
scoring_elements 0.42569
published_at 2026-04-08T12:55:00Z
1
value 0.00204
scoring_system epss
scoring_elements 0.4255
published_at 2026-04-02T12:55:00Z
2
value 0.00204
scoring_system epss
scoring_elements 0.42578
published_at 2026-04-09T12:55:00Z
3
value 0.00204
scoring_system epss
scoring_elements 0.42517
published_at 2026-04-07T12:55:00Z
4
value 0.00204
scoring_system epss
scoring_elements 0.42512
published_at 2026-04-21T12:55:00Z
5
value 0.00204
scoring_system epss
scoring_elements 0.4258
published_at 2026-04-18T12:55:00Z
6
value 0.00204
scoring_system epss
scoring_elements 0.42595
published_at 2026-04-16T12:55:00Z
7
value 0.00204
scoring_system epss
scoring_elements 0.42535
published_at 2026-04-13T12:55:00Z
8
value 0.00204
scoring_system epss
scoring_elements 0.42564
published_at 2026-04-12T12:55:00Z
9
value 0.00204
scoring_system epss
scoring_elements 0.426
published_at 2026-04-11T12:55:00Z
url https://api.first.org/data/v1/epss?cve=CVE-2024-27354
1
reference_url https://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2024-27354
reference_id
reference_type
scores
url https://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2024-27354
2
reference_url https://gist.github.com/katzj/ee72f3c2a00590812b2ea3c0c8890e0b
reference_id
reference_type
scores
0
value 7.5
scoring_system cvssv3.1
scoring_elements CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H
1
value 8.7
scoring_system cvssv4
scoring_elements CVSS:4.0/AV:N/AC:L/AT:N/PR:N/UI:N/VC:N/VI:N/VA:H/SC:N/SI:N/SA:N
2
value HIGH
scoring_system generic_textual
scoring_elements
3
value Track
scoring_system ssvc
scoring_elements SSVCv2/E:N/A:Y/T:P/P:M/B:A/M:M/D:T/2024-03-06T15:59:46Z/
url https://gist.github.com/katzj/ee72f3c2a00590812b2ea3c0c8890e0b
3
reference_url https://github.com/advisories/GHSA-hg35-mp25-qf6h
reference_id
reference_type
scores
0
value 7.5
scoring_system cvssv3.1
scoring_elements CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H
1
value HIGH
scoring_system cvssv3.1_qr
scoring_elements
2
value 8.7
scoring_system cvssv4
scoring_elements CVSS:4.0/AV:N/AC:L/AT:N/PR:N/UI:N/VC:N/VI:N/VA:H/SC:N/SI:N/SA:N
3
value HIGH
scoring_system generic_textual
scoring_elements
url https://github.com/advisories/GHSA-hg35-mp25-qf6h
4
reference_url https://github.com/FriendsOfPHP/security-advisories/blob/master/phpseclib/phpseclib/CVE-2024-27354.yaml
reference_id
reference_type
scores
0
value 7.5
scoring_system cvssv3.1
scoring_elements CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H
1
value 8.7
scoring_system cvssv4
scoring_elements CVSS:4.0/AV:N/AC:L/AT:N/PR:N/UI:N/VC:N/VI:N/VA:H/SC:N/SI:N/SA:N
2
value HIGH
scoring_system generic_textual
scoring_elements
url https://github.com/FriendsOfPHP/security-advisories/blob/master/phpseclib/phpseclib/CVE-2024-27354.yaml
5
reference_url https://github.com/phpseclib/phpseclib
reference_id
reference_type
scores
0
value 7.5
scoring_system cvssv3.1
scoring_elements CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H
1
value 8.7
scoring_system cvssv4
scoring_elements CVSS:4.0/AV:N/AC:L/AT:N/PR:N/UI:N/VC:N/VI:N/VA:H/SC:N/SI:N/SA:N
2
value HIGH
scoring_system generic_textual
scoring_elements
url https://github.com/phpseclib/phpseclib
6
reference_url https://github.com/phpseclib/phpseclib/blob/master/phpseclib/Math/PrimeField.php#L49
reference_id
reference_type
scores
0
value 7.5
scoring_system cvssv3.1
scoring_elements CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H
1
value 8.7
scoring_system cvssv4
scoring_elements CVSS:4.0/AV:N/AC:L/AT:N/PR:N/UI:N/VC:N/VI:N/VA:H/SC:N/SI:N/SA:N
2
value HIGH
scoring_system generic_textual
scoring_elements
3
value Track
scoring_system ssvc
scoring_elements SSVCv2/E:N/A:Y/T:P/P:M/B:A/M:M/D:T/2024-03-06T15:59:46Z/
url https://github.com/phpseclib/phpseclib/blob/master/phpseclib/Math/PrimeField.php#L49
7
reference_url https://github.com/phpseclib/phpseclib/commit/2870c8fab3f132d2ed40a66c97a36fe5ab625698
reference_id
reference_type
scores
0
value 7.5
scoring_system cvssv3.1
scoring_elements CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H
1
value 8.7
scoring_system cvssv4
scoring_elements CVSS:4.0/AV:N/AC:L/AT:N/PR:N/UI:N/VC:N/VI:N/VA:H/SC:N/SI:N/SA:N
2
value HIGH
scoring_system generic_textual
scoring_elements
url https://github.com/phpseclib/phpseclib/commit/2870c8fab3f132d2ed40a66c97a36fe5ab625698
8
reference_url https://github.com/phpseclib/phpseclib/commit/ad5dbdf2129f5e0fb644637770b7f33de8ca8575
reference_id
reference_type
scores
0
value 7.5
scoring_system cvssv3.1
scoring_elements CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H
1
value 8.7
scoring_system cvssv4
scoring_elements CVSS:4.0/AV:N/AC:L/AT:N/PR:N/UI:N/VC:N/VI:N/VA:H/SC:N/SI:N/SA:N
2
value HIGH
scoring_system generic_textual
scoring_elements
url https://github.com/phpseclib/phpseclib/commit/ad5dbdf2129f5e0fb644637770b7f33de8ca8575
9
reference_url https://github.com/phpseclib/phpseclib/commit/c55b75199ec8d12cec6eadf6da99da4a3712fe56
reference_id
reference_type
scores
0
value 7.5
scoring_system cvssv3.1
scoring_elements CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H
1
value 8.7
scoring_system cvssv4
scoring_elements CVSS:4.0/AV:N/AC:L/AT:N/PR:N/UI:N/VC:N/VI:N/VA:H/SC:N/SI:N/SA:N
2
value HIGH
scoring_system generic_textual
scoring_elements
url https://github.com/phpseclib/phpseclib/commit/c55b75199ec8d12cec6eadf6da99da4a3712fe56
10
reference_url https://lists.debian.org/debian-lts-announce/2024/03/msg00002.html
reference_id
reference_type
scores
0
value 7.5
scoring_system cvssv3.1
scoring_elements CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H
1
value 8.7
scoring_system cvssv4
scoring_elements CVSS:4.0/AV:N/AC:L/AT:N/PR:N/UI:N/VC:N/VI:N/VA:H/SC:N/SI:N/SA:N
2
value HIGH
scoring_system generic_textual
scoring_elements
3
value Track
scoring_system ssvc
scoring_elements SSVCv2/E:N/A:Y/T:P/P:M/B:A/M:M/D:T/2024-03-06T15:59:46Z/
url https://lists.debian.org/debian-lts-announce/2024/03/msg00002.html
11
reference_url https://lists.debian.org/debian-lts-announce/2024/03/msg00003.html
reference_id
reference_type
scores
0
value 7.5
scoring_system cvssv3.1
scoring_elements CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H
1
value 8.7
scoring_system cvssv4
scoring_elements CVSS:4.0/AV:N/AC:L/AT:N/PR:N/UI:N/VC:N/VI:N/VA:H/SC:N/SI:N/SA:N
2
value HIGH
scoring_system generic_textual
scoring_elements
3
value Track
scoring_system ssvc
scoring_elements SSVCv2/E:N/A:Y/T:P/P:M/B:A/M:M/D:T/2024-03-06T15:59:46Z/
url https://lists.debian.org/debian-lts-announce/2024/03/msg00003.html
12
reference_url https://nvd.nist.gov/vuln/detail/CVE-2024-27354
reference_id
reference_type
scores
0
value 7.5
scoring_system cvssv3.1
scoring_elements CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H
1
value 8.7
scoring_system cvssv4
scoring_elements CVSS:4.0/AV:N/AC:L/AT:N/PR:N/UI:N/VC:N/VI:N/VA:H/SC:N/SI:N/SA:N
2
value HIGH
scoring_system generic_textual
scoring_elements
url https://nvd.nist.gov/vuln/detail/CVE-2024-27354
13
reference_url https://usn.ubuntu.com/7404-1/
reference_id USN-7404-1
reference_type
scores
url https://usn.ubuntu.com/7404-1/
fixed_packages
0
url pkg:composer/phpseclib/phpseclib@2.0.47
purl pkg:composer/phpseclib/phpseclib@2.0.47
is_vulnerable false
affected_by_vulnerabilities
resource_url http://public2.vulnerablecode.io/packages/pkg:composer/phpseclib/phpseclib@2.0.47
1
url pkg:composer/phpseclib/phpseclib@3.0.36
purl pkg:composer/phpseclib/phpseclib@3.0.36
is_vulnerable false
affected_by_vulnerabilities
resource_url http://public2.vulnerablecode.io/packages/pkg:composer/phpseclib/phpseclib@3.0.36
aliases CVE-2024-27354, GHSA-hg35-mp25-qf6h
risk_score 4.0
exploitability 0.5
weighted_severity 8.0
resource_url http://public2.vulnerablecode.io/vulnerabilities/VCID-6xjw-f9xu-fkg8
1
url VCID-8h2u-szq5-13ar
vulnerability_id VCID-8h2u-szq5-13ar
summary
Name confusion in x509 Subject Alternative Name fields
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.
references
0
reference_url https://api.first.org/data/v1/epss?cve=CVE-2023-52892
reference_id
reference_type
scores
0
value 0.00183
scoring_system epss
scoring_elements 0.40068
published_at 2026-04-02T12:55:00Z
1
value 0.00183
scoring_system epss
scoring_elements 0.40094
published_at 2026-04-04T12:55:00Z
2
value 0.00188
scoring_system epss
scoring_elements 0.4069
published_at 2026-04-16T12:55:00Z
3
value 0.00188
scoring_system epss
scoring_elements 0.40645
published_at 2026-04-13T12:55:00Z
4
value 0.00188
scoring_system epss
scoring_elements 0.40664
published_at 2026-04-12T12:55:00Z
5
value 0.00188
scoring_system epss
scoring_elements 0.40699
published_at 2026-04-11T12:55:00Z
6
value 0.00188
scoring_system epss
scoring_elements 0.40672
published_at 2026-04-08T12:55:00Z
7
value 0.00188
scoring_system epss
scoring_elements 0.40622
published_at 2026-04-07T12:55:00Z
8
value 0.00188
scoring_system epss
scoring_elements 0.40681
published_at 2026-04-09T12:55:00Z
9
value 0.00188
scoring_system epss
scoring_elements 0.40659
published_at 2026-04-18T12:55:00Z
10
value 0.00225
scoring_system epss
scoring_elements 0.45206
published_at 2026-04-21T12:55:00Z
url https://api.first.org/data/v1/epss?cve=CVE-2023-52892
1
reference_url https://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2023-52892
reference_id
reference_type
scores
url https://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2023-52892
2
reference_url https://github.com/phpseclib/phpseclib
reference_id
reference_type
scores
0
value 7.5
scoring_system cvssv3.1
scoring_elements CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:N/A:N
1
value 8.7
scoring_system cvssv4
scoring_elements 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
2
value HIGH
scoring_system generic_textual
scoring_elements
url https://github.com/phpseclib/phpseclib
3
reference_url https://github.com/phpseclib/phpseclib/commit/6cd6e8ceab9f2b55c8cd81d2192bf98cbeaf4627
reference_id
reference_type
scores
0
value 7.5
scoring_system cvssv3.1
scoring_elements CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:N/A:N
1
value 8.7
scoring_system cvssv4
scoring_elements 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
2
value HIGH
scoring_system generic_textual
scoring_elements
3
value Track
scoring_system ssvc
scoring_elements SSVCv2/E:N/A:Y/T:T/P:M/B:A/M:M/D:T/2024-08-21T19:54:11Z/
url https://github.com/phpseclib/phpseclib/commit/6cd6e8ceab9f2b55c8cd81d2192bf98cbeaf4627
4
reference_url https://github.com/phpseclib/phpseclib/issues/1943
reference_id
reference_type
scores
0
value 7.5
scoring_system cvssv3.1
scoring_elements CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:N/A:N
1
value 8.7
scoring_system cvssv4
scoring_elements 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
2
value HIGH
scoring_system generic_textual
scoring_elements
3
value Track
scoring_system ssvc
scoring_elements SSVCv2/E:N/A:Y/T:T/P:M/B:A/M:M/D:T/2024-08-21T19:54:11Z/
url https://github.com/phpseclib/phpseclib/issues/1943
5
reference_url https://github.com/phpseclib/phpseclib/releases/tag/3.0.33
reference_id
reference_type
scores
0
value 7.5
scoring_system cvssv3.1
scoring_elements CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:N/A:N
1
value 8.7
scoring_system cvssv4
scoring_elements 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
2
value HIGH
scoring_system generic_textual
scoring_elements
3
value Track
scoring_system ssvc
scoring_elements SSVCv2/E:N/A:Y/T:T/P:M/B:A/M:M/D:T/2024-08-21T19:54:11Z/
url https://github.com/phpseclib/phpseclib/releases/tag/3.0.33
6
reference_url https://github.com/x509-name-testing/name_testing_artifacts
reference_id
reference_type
scores
0
value 7.5
scoring_system cvssv3.1
scoring_elements CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:N/A:N
1
value 8.7
scoring_system cvssv4
scoring_elements 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
2
value HIGH
scoring_system generic_textual
scoring_elements
3
value Track
scoring_system ssvc
scoring_elements SSVCv2/E:N/A:Y/T:T/P:M/B:A/M:M/D:T/2024-08-21T19:54:11Z/
url https://github.com/x509-name-testing/name_testing_artifacts
7
reference_url https://nvd.nist.gov/vuln/detail/CVE-2023-52892
reference_id
reference_type
scores
0
value 7.5
scoring_system cvssv3.1
scoring_elements CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:N/A:N
1
value 8.7
scoring_system cvssv4
scoring_elements 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
2
value HIGH
scoring_system generic_textual
scoring_elements
url https://nvd.nist.gov/vuln/detail/CVE-2023-52892
8
reference_url https://github.com/advisories/GHSA-ff7q-6vwh-v9m4
reference_id GHSA-ff7q-6vwh-v9m4
reference_type
scores
0
value HIGH
scoring_system cvssv3.1_qr
scoring_elements
url https://github.com/advisories/GHSA-ff7q-6vwh-v9m4
9
reference_url https://usn.ubuntu.com/7404-1/
reference_id USN-7404-1
reference_type
scores
url https://usn.ubuntu.com/7404-1/
fixed_packages
0
url pkg:composer/phpseclib/phpseclib@2.0.46
purl pkg:composer/phpseclib/phpseclib@2.0.46
is_vulnerable true
affected_by_vulnerabilities
0
vulnerability VCID-6xjw-f9xu-fkg8
1
vulnerability VCID-ars3-xpyv-jbf1
resource_url http://public2.vulnerablecode.io/packages/pkg:composer/phpseclib/phpseclib@2.0.46
1
url pkg:composer/phpseclib/phpseclib@3.0.33
purl pkg:composer/phpseclib/phpseclib@3.0.33
is_vulnerable true
affected_by_vulnerabilities
0
vulnerability VCID-6xjw-f9xu-fkg8
1
vulnerability VCID-ars3-xpyv-jbf1
2
vulnerability VCID-zxph-sjym-kqhg
resource_url http://public2.vulnerablecode.io/packages/pkg:composer/phpseclib/phpseclib@3.0.33
aliases CVE-2023-52892, GHSA-ff7q-6vwh-v9m4
risk_score 4.0
exploitability 0.5
weighted_severity 8.0
resource_url http://public2.vulnerablecode.io/vulnerabilities/VCID-8h2u-szq5-13ar
2
url VCID-ars3-xpyv-jbf1
vulnerability_id VCID-ars3-xpyv-jbf1
summary
phpseclib does not properly limit the ASN1 OID length
An issue was discovered in phpseclib 1.x before 1.0.23, 2.x before 2.0.47, and 3.x before 3.0.36. When processing the ASN.1 object identifier of a certificate, a sub identifier may be provided that leads to a denial of service (CPU consumption for decodeOID).
references
0
reference_url https://api.first.org/data/v1/epss?cve=CVE-2024-27355
reference_id
reference_type
scores
0
value 0.00204
scoring_system epss
scoring_elements 0.42564
published_at 2026-04-12T12:55:00Z
1
value 0.00204
scoring_system epss
scoring_elements 0.42512
published_at 2026-04-21T12:55:00Z
2
value 0.00204
scoring_system epss
scoring_elements 0.4258
published_at 2026-04-18T12:55:00Z
3
value 0.00204
scoring_system epss
scoring_elements 0.42595
published_at 2026-04-16T12:55:00Z
4
value 0.00204
scoring_system epss
scoring_elements 0.42535
published_at 2026-04-13T12:55:00Z
5
value 0.00204
scoring_system epss
scoring_elements 0.4255
published_at 2026-04-02T12:55:00Z
6
value 0.00204
scoring_system epss
scoring_elements 0.42578
published_at 2026-04-09T12:55:00Z
7
value 0.00204
scoring_system epss
scoring_elements 0.42517
published_at 2026-04-07T12:55:00Z
8
value 0.00204
scoring_system epss
scoring_elements 0.42569
published_at 2026-04-08T12:55:00Z
9
value 0.00204
scoring_system epss
scoring_elements 0.426
published_at 2026-04-11T12:55:00Z
url https://api.first.org/data/v1/epss?cve=CVE-2024-27355
1
reference_url https://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2024-27355
reference_id
reference_type
scores
url https://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2024-27355
2
reference_url https://gist.github.com/katzj/ee72f3c2a00590812b2ea3c0c8890e0b
reference_id
reference_type
scores
0
value 7.5
scoring_system cvssv3.1
scoring_elements CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H
1
value HIGH
scoring_system generic_textual
scoring_elements
2
value Track
scoring_system ssvc
scoring_elements SSVCv2/E:N/A:Y/T:P/P:M/B:A/M:M/D:T/2024-08-09T14:10:07Z/
url https://gist.github.com/katzj/ee72f3c2a00590812b2ea3c0c8890e0b
3
reference_url https://github.com/advisories/GHSA-jr22-8qgm-4q87
reference_id
reference_type
scores
0
value 7.5
scoring_system cvssv3.1
scoring_elements CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H
1
value HIGH
scoring_system cvssv3.1_qr
scoring_elements
2
value HIGH
scoring_system generic_textual
scoring_elements
url https://github.com/advisories/GHSA-jr22-8qgm-4q87
4
reference_url https://github.com/FriendsOfPHP/security-advisories/blob/master/phpseclib/phpseclib/CVE-2024-27355.yaml
reference_id
reference_type
scores
0
value 7.5
scoring_system cvssv3.1
scoring_elements CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H
1
value HIGH
scoring_system generic_textual
scoring_elements
url https://github.com/FriendsOfPHP/security-advisories/blob/master/phpseclib/phpseclib/CVE-2024-27355.yaml
5
reference_url https://github.com/phpseclib/phpseclib
reference_id
reference_type
scores
0
value 7.5
scoring_system cvssv3.1
scoring_elements CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H
1
value HIGH
scoring_system generic_textual
scoring_elements
url https://github.com/phpseclib/phpseclib
6
reference_url https://github.com/phpseclib/phpseclib/blob/978d081fe50ff92879c50ff143c62a143edb0117/phpseclib/File/ASN1.php#L1129
reference_id
reference_type
scores
0
value 7.5
scoring_system cvssv3.1
scoring_elements CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H
1
value HIGH
scoring_system generic_textual
scoring_elements
2
value Track
scoring_system ssvc
scoring_elements SSVCv2/E:N/A:Y/T:P/P:M/B:A/M:M/D:T/2024-08-09T14:10:07Z/
url https://github.com/phpseclib/phpseclib/blob/978d081fe50ff92879c50ff143c62a143edb0117/phpseclib/File/ASN1.php#L1129
7
reference_url https://github.com/phpseclib/phpseclib/commit/e32531001b4d62c66c3d824ccef54ffad835eb59
reference_id
reference_type
scores
0
value 7.5
scoring_system cvssv3.1
scoring_elements CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H
1
value HIGH
scoring_system generic_textual
scoring_elements
url https://github.com/phpseclib/phpseclib/commit/e32531001b4d62c66c3d824ccef54ffad835eb59
8
reference_url https://lists.debian.org/debian-lts-announce/2024/03/msg00002.html
reference_id
reference_type
scores
0
value 7.5
scoring_system cvssv3.1
scoring_elements CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H
1
value HIGH
scoring_system generic_textual
scoring_elements
2
value Track
scoring_system ssvc
scoring_elements SSVCv2/E:N/A:Y/T:P/P:M/B:A/M:M/D:T/2024-08-09T14:10:07Z/
url https://lists.debian.org/debian-lts-announce/2024/03/msg00002.html
9
reference_url https://lists.debian.org/debian-lts-announce/2024/03/msg00003.html
reference_id
reference_type
scores
0
value 7.5
scoring_system cvssv3.1
scoring_elements CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H
1
value HIGH
scoring_system generic_textual
scoring_elements
2
value Track
scoring_system ssvc
scoring_elements SSVCv2/E:N/A:Y/T:P/P:M/B:A/M:M/D:T/2024-08-09T14:10:07Z/
url https://lists.debian.org/debian-lts-announce/2024/03/msg00003.html
10
reference_url https://nvd.nist.gov/vuln/detail/CVE-2024-27355
reference_id
reference_type
scores
0
value 7.5
scoring_system cvssv3.1
scoring_elements CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H
1
value HIGH
scoring_system generic_textual
scoring_elements
url https://nvd.nist.gov/vuln/detail/CVE-2024-27355
11
reference_url https://usn.ubuntu.com/7404-1/
reference_id USN-7404-1
reference_type
scores
url https://usn.ubuntu.com/7404-1/
fixed_packages
0
url pkg:composer/phpseclib/phpseclib@2.0.47
purl pkg:composer/phpseclib/phpseclib@2.0.47
is_vulnerable false
affected_by_vulnerabilities
resource_url http://public2.vulnerablecode.io/packages/pkg:composer/phpseclib/phpseclib@2.0.47
1
url pkg:composer/phpseclib/phpseclib@3.0.36
purl pkg:composer/phpseclib/phpseclib@3.0.36
is_vulnerable false
affected_by_vulnerabilities
resource_url http://public2.vulnerablecode.io/packages/pkg:composer/phpseclib/phpseclib@3.0.36
aliases CVE-2024-27355, GHSA-jr22-8qgm-4q87
risk_score 4.0
exploitability 0.5
weighted_severity 8.0
resource_url http://public2.vulnerablecode.io/vulnerabilities/VCID-ars3-xpyv-jbf1
3
url VCID-hnn9-wcwe-ffa5
vulnerability_id VCID-hnn9-wcwe-ffa5
summary
phpseclib has a variable-time HMAC comparison in SSH2::get_binary_packet() using != instead of hash_equals()
# phpseclib SSH2: Variable-time comparison in HMAC verification

## Summary

`phpseclib\Net\SSH2::get_binary_packet()` uses PHP's `!=` operator to compare a received SSH packet HMAC against the locally computed HMAC. `!=` on equal-length binary strings in PHP uses `memcmp()`, which short-circuits on the first differing byte. This is a real variable-time comparison (CWE-208), proven by scaling benchmarks.

The finding is **Low severity (defense-in-depth)**, not Critical. Practical exploitation over the network is prevented by SSH's disconnect-on-MAC-failure behavior combined with per-connection session keys. The fix is a one-liner: replace `!=` with `hash_equals()`, which the codebase already uses in 9 other places.

- **Target:** `phpseclib/phpseclib`
- **File:** `phpseclib/Net/SSH2.php`
- **Lines (master `e819a163c`):** 3405 and 3410
- **CWE:** CWE-208 (Observable Timing Discrepancy)
- **CVSS v3.1:** 3.7 — `CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:L/I:N/A:N`
- **Severity:** Low (cryptographic hygiene / defense-in-depth)
- **Affected branches:** `master`, `3.0`, `2.0`, `1.0` (all supported versions)

## Root cause

`phpseclib/Net/SSH2.php` lines 3399-3415 (master at `e819a163c`):

```php
if ($this->hmac_check instanceof Hash) {
    $reconstructed = !$this->hmac_check_etm ?
        pack('Na*', $packet->packet_length, $packet->plain) :
        substr($packet->raw, 0, -$this->hmac_size);
    if (($this->hmac_check->getHash() & "\xFF\xFF\xFF\xFF") == 'umac') {
        $this->hmac_check->setNonce("\0\0\0\0" . pack('N', $this->get_seq_no));
        if ($hmac != $this->hmac_check->hash($reconstructed)) {                     // <-- line 3405
            $this->disconnect_helper(DisconnectReason::MAC_ERROR);
            throw new ConnectionClosedException('Invalid UMAC');
        }
    } else {
        if ($hmac != $this->hmac_check->hash(pack('Na*', $this->get_seq_no, $reconstructed))) {  // <-- line 3410
            $this->disconnect_helper(DisconnectReason::MAC_ERROR);
            throw new ConnectionClosedException('Invalid HMAC');
        }
    }
}
```

Both `$hmac` (read from the socket via `Strings::pop($raw, $this->hmac_size)` at line 3348) and the computed hash are equal-length binary strings. PHP's `!=` operator on equal-length strings dispatches to `zend_binary_strcmp()` which internally calls `memcmp()`. Modern libc `memcmp` short-circuits on the first differing byte, producing a timing signal that scales linearly with the number of matching leading bytes.

### The same bug exists on every supported branch

| Branch | File | Line(s) | Expression |
|---|---|---|---|
| `master` (@ `e819a163c`) | `phpseclib/Net/SSH2.php` | 3405, 3410 | `$hmac != $this->hmac_check->hash(...)` |
| `3.0` | `phpseclib/Net/SSH2.php` | 3741, 3746 | `$hmac != $this->hmac_check->hash(...)` |
| `2.0` | `phpseclib/Net/SSH2.php` | 3796 | `$hmac != $this->hmac_check->hash(...)` |
| `1.0` | `phpseclib/Net/SSH2.php` | 3810 | `$hmac != $this->hmac_check->hash(...)` |

Verified with `git show <branch>:phpseclib/Net/SSH2.php`.

### Reachability

The HMAC verification path at lines 3399-3415 is reached on **every received SSH packet** when the negotiated cipher is not AEAD — i.e., any of:

- `aes128-cbc`, `aes192-cbc`, `aes256-cbc`
- `aes128-ctr`, `aes192-ctr`, `aes256-ctr`
- `3des-cbc`, `3des-ctr`
- `blowfish-cbc`, `blowfish-ctr`
- `twofish-*-cbc`, `twofish-*-ctr`
- `arcfour`, `arcfour128`, `arcfour256`

combined with any non-AEAD MAC (hmac-sha2-256, hmac-sha2-512, hmac-sha1, hmac-sha1-96, hmac-md5, hmac-md5-96, umac-64, umac-128, and their -etm variants — full list at `getSupportedMACAlgorithms()` around line 4754).

AEAD ciphers (`aes128-gcm@openssh.com`, `aes256-gcm@openssh.com`, `chacha20-poly1305@openssh.com`) go through a different path (lines 3353-3381) and do not reach the `!=` comparison — their authentication tag is checked inside the AEAD implementation.

`$this->hmac_check` is set during key exchange at `SSH2.php:1812`:

```php
if (!$this->decrypt->usesNonce()) {
    [$this->hmac_check, $checkKeyLength] = self::mac_algorithm_to_hash_instance($mac_algorithm_in);
    $this->hmac_size = $this->hmac_check->getLengthInBytes();
}
```

So any SSH2 client session negotiating a non-AEAD cipher exercises the vulnerable code path starting from the first post-KEX packet.

### Contrast with existing code that does the right thing

`hash_equals()` is already used in 9 other places in the phpseclib codebase, proving the maintainer knows the pattern:

```
phpseclib/File/CMS/DigestedData.php:186
phpseclib/File/CMS/SignedData/Signer.php:294
phpseclib/File/CMS/SignedData/Signer.php:406
phpseclib/Crypt/Common/Formats/Keys/PuTTY.php:236
phpseclib/Crypt/RSA/PublicKey.php:98, 105, 188, 229
phpseclib/Crypt/RSA/PrivateKey.php:386
```

The SSH2 MAC comparison is the one place it was missed.

## Proof of concept

All scripts under `poc/`. They prove three things:
1. PHP's `!=` on equal-length binary strings IS variable-time and short-circuits.
2. `hash_equals()` is constant-time over the same inputs.
3. Applied to 32-byte HMAC-SHA256 values as produced by phpseclib's `Crypt\Hash` class, the code path at `SSH2.php:3405/3410` leaks ~2-14 ns of signal per comparison.

### PoC 1: baseline measurement (`poc/01_verify_variable_time.php`)

Measures `!=` vs `hash_equals()` on 32-byte strings with first-byte vs last-byte mismatch. 500,000 iterations each, trimmed mean, Welch's t-test.

Representative output (PHP 8.3.6 on Linux x86_64):

```
=== PHP != operator vs hash_equals() on 32-byte strings ===
Iterations: 500000

!= first-byte mismatch: median=40 p25=40 p75=50 tmean=44.3
!= last-byte mismatch:  median=50 p25=40 p75=50 tmean=46.4
Gap (last - first):     tmean_delta=2.1 ns

hash_equals first-byte: median=110 tmean=112.7
hash_equals last-byte:  median=111 tmean=114.9
Gap (last - first):     tmean_delta=2.2 ns
```

The 32-byte delta is small (~2 ns) and lives in the noise. This alone doesn't prove variable-time behavior. PoC 2 does.

### PoC 2: scaling test (`poc/02_scaling_test.php`)

The decisive test. If `!=` is truly constant-time, timing should not depend on mismatch position. If it short-circuits, timing should scale linearly with prefix length. Test strings from 32 bytes to 4096 bytes.

```
Length  32 bytes: range (first-last byte mismatch) =   1.72 ns
Length  64 bytes: range                            =   2.42 ns
Length 128 bytes: range                            =   8.33 ns
Length 256 bytes: range                            =  16.91 ns
Length 512 bytes: range                            =  38.89 ns
Length 1024 bytes: range                           =  81.16 ns
Length 4096 bytes: range                           = 284.26 ns
```

**This is monotone, linear scaling.** Confirmed variable-time: `!=` short-circuits. Per-byte delta ≈ 0.089 ns/byte (4096 bytes → ~284 ns → 284/4096 ≈ 0.069 ns/byte after accounting for the fixed call overhead).

### PoC 3: contrast with `hash_equals()` (`poc/03_hash_equals_scaling.php`)

Same test, `!=` vs `hash_equals()` on 1024-byte strings:

```
Mismatch pos         | != tmean (ns)        | hash_equals tmean
----------------------------------------------------------------------
byte    0            |    83.72 (sd  4.79) |   873.78 (sd 100.71)
byte  128            |    98.48 (sd  8.27) |   855.10 (sd 87.50)
byte  256            |   103.36 (sd  7.01) |   869.21 (sd 89.61)
byte  512            |   125.65 (sd 10.07) |   879.74 (sd 81.82)
byte  768            |   145.73 (sd  9.96) |   848.59 (sd 84.34)
byte 1023            |   175.33 (sd 14.31) |   852.24 (sd 85.81)

!= range (last - first):          91.62 ns
hash_equals range (last - first): 31.15 ns
```

`!=` monotonically increases with mismatch position. `hash_equals` is flat; the 31 ns range is measurement jitter (sd ≈ 90 ns > range).

Per-byte delta from this run: 91.62 / 1023 ≈ 0.089 ns/byte. Extrapolated to 32-byte HMAC: ~2.86 ns total signal between first-byte-diff and last-byte-diff.

### PoC 4: end-to-end with phpseclib's Hash class (`poc/04_phpseclib_in_context.php`)

Uses `phpseclib4\Crypt\Hash` (the exact class bound to `$this->hmac_check`) to compute a real HMAC-SHA-256, then executes the exact expression `$hmac != $this->hmac_check->hash(...)` from SSH2.php:3410:

```
Using != (SSH2.php:3405,3410 pattern):
  first-byte mismatch: 44.33 ns
  last-byte mismatch:  58.19 ns
  Δ (last - first):    13.86 ns  <-- timing leak signal

Using hash_equals() (the fix):
  first-byte mismatch: 113.67 ns
  last-byte mismatch:  112.93 ns
  Δ (last - first):    -0.74 ns  <-- should be flat (noise)
```

The 13.86 ns vs 2.86 ns variation between runs is within measurement variance — the signal is real and the sign matches every run (last > first for `!=`, flat for `hash_equals`).

## Impact

**Severity: Low (defense-in-depth).** This is a real CWE-208 instance, but it is not a practical remote vulnerability.

### Why exploitation over the network is infeasible

1. **Signal is tiny.** ~3-14 ns per HMAC compare. Network RTT jitter on a reasonable LAN is 100 µs (100,000 ns). On the internet it is 1-10 ms. The signal-to-noise ratio for a remote observer is ~1e-5 to 1e-7.

2. **One measurement per connection.** On every MAC failure, `SSH2.php:3406/3411` calls `disconnect_helper(MAC_ERROR)` and throws. The connection is torn down. A reconnect goes through a fresh key exchange, producing a new HMAC key. The HMAC over a fresh key is uncorrelated with the prior HMAC. An attacker cannot accumulate prefix-matching information across connections because there is no fixed target.

3. **MAC is over sequence-numbered data.** Each packet's MAC input includes `$this->get_seq_no` (line 3410) or a nonce (line 3404). Even within a single connection, replays are impossible — every MAC is bound to a distinct seq number. There is no stable oracle to probe.

4. **No adaptive probe.** A Bleichenbacher/Lucky13-style attack needs tens of thousands of adaptive queries against a single secret. SSH's hard disconnect eliminates this primitive entirely.

5. **Rough sample-count requirement.** To distinguish a 3 ns signal from 1 ms jitter with high confidence you need roughly `(noise / signal)^2 ≈ (1e6 / 3)^2 ≈ 1e11` independent samples. With one sample per connection (and each connection being against a fresh secret), this is unreachable on any practical scale.

### What remains real

1. **Cryptographic hygiene.** A security library should not use non-constant-time comparison on MACs, period. That is standard practice (RFC 4634, NIST SP 800-131A guidance on cryptographic implementations).
2. **Code correctness / API consistency.** The library already uses `hash_equals()` in 9 other comparable places. The SSH2 MAC path is inconsistent with the rest of the codebase.
3. **Future-proofing.** If PHP or the underlying `memcmp()` implementation changes, or if a future MAC algorithm uses longer digests, the signal grows linearly. A constant-time comparison eliminates the concern permanently.
4. **Static analysis / audit hygiene.** Cryptographic linters (e.g., GitHub CodeQL's `js/timing-attack`, phpcs-security-audit) flag non-constant-time comparisons on secret values. A clean codebase passes those checks.

### CVSS breakdown

`CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:L/I:N/A:N` = **3.7 (Low)**

- **AV:N** — network path, attacker on the SSH transport.
- **AC:H** — extremely high complexity; remote exploitation is not demonstrated and is believed infeasible.
- **PR:N/UI:N** — no prior auth or interaction needed to observe the timing (if there were any signal).
- **S:U** — no scope change.
- **C:L / I:N / A:N** — theoretical information exposure of MAC prefix bits only, no integrity or availability impact.

This is the same vector string used for CVE-2026-32935 (the recent AES-CBC padding oracle in the same library), differing only in Confidentiality (L vs H) because padding oracle actually recovers plaintext whereas this MAC timing does not enable any known plaintext recovery.

## Fix

Two-line patch:

```diff
--- a/phpseclib/Net/SSH2.php
+++ b/phpseclib/Net/SSH2.php
@@ -3402,12 +3402,12 @@ class SSH2
                 substr($packet->raw, 0, -$this->hmac_size);
             if (($this->hmac_check->getHash() & "\xFF\xFF\xFF\xFF") == 'umac') {
                 $this->hmac_check->setNonce("\0\0\0\0" . pack('N', $this->get_seq_no));
-                if ($hmac != $this->hmac_check->hash($reconstructed)) {
+                if (!hash_equals($this->hmac_check->hash($reconstructed), $hmac)) {
                     $this->disconnect_helper(DisconnectReason::MAC_ERROR);
                     throw new ConnectionClosedException('Invalid UMAC');
                 }
             } else {
-                if ($hmac != $this->hmac_check->hash(pack('Na*', $this->get_seq_no, $reconstructed))) {
+                if (!hash_equals($this->hmac_check->hash(pack('Na*', $this->get_seq_no, $reconstructed)), $hmac)) {
                     $this->disconnect_helper(DisconnectReason::MAC_ERROR);
                     throw new ConnectionClosedException('Invalid HMAC');
                 }
```

The same one-liner should be applied to `phpseclib/Net/SSH2.php` on `3.0` (lines 3741, 3746), `2.0` (line 3796), and `1.0` (line 3810).

`hash_equals()` is a built-in PHP function available since PHP 5.6. phpseclib's minimum PHP version for all supported branches is well above that, so there is no compatibility concern — and indeed, as noted, `hash_equals()` is already used throughout the codebase for exactly this purpose.

### PoC 5: prefix-position byte-recovery test (`poc/05_prefix_position_test.php`)

The critical question: can an attacker recover the MAC byte-by-byte? Tests candidate MACs with 0, 1, 2, ..., 31 correct leading bytes using phpseclib's `Crypt\Hash` class. 500,000 iterations per position.

```
 0 correct prefix bytes: tmean= 65.75 ns  sd= 4.89 ns
 1 correct prefix bytes: tmean= 66.36 ns  sd= 4.77 ns
 2 correct prefix bytes: tmean= 60.06 ns  sd= 5.29 ns
 4 correct prefix bytes: tmean= 58.08 ns  sd= 5.24 ns
 8 correct prefix bytes: tmean= 66.93 ns  sd= 4.60 ns
12 correct prefix bytes: tmean= 64.01 ns  sd= 4.83 ns
16 correct prefix bytes: tmean= 61.81 ns  sd= 5.55 ns
20 correct prefix bytes: tmean= 60.46 ns  sd= 5.40 ns
24 correct prefix bytes: tmean= 60.53 ns  sd= 4.06 ns
28 correct prefix bytes: tmean= 60.54 ns  sd= 3.99 ns
31 correct prefix bytes: tmean= 59.04 ns  sd= 3.96 ns

Range (0 prefix vs 31 prefix): -6.71 ns (NEGATIVE)
```

**No monotonic signal.** The range is negative (wrong direction for an oracle), and the standard deviations (4-5 ns) are larger than any observed position-dependent delta. Byte-by-byte MAC recovery is not feasible even locally on 32-byte HMACs.

This conclusively rules out the "timing oracle for MAC forgery" escalation path.

## Escalation angles investigated and ruled out

9 rounds of external review suggested various escalation paths. Every one is dead:

| Angle | Result | Evidence |
|---|---|---|
| Byte-by-byte MAC recovery | **Dead** | PoC 5: no monotonic signal at 32 bytes (-6.71ns range, wrong sign) |
| Persistent oracle (connection survives MAC failure) | **Dead** | disconnect_helper() + throw is unconditional (3406-3412); reset_connection() clears all state |
| Sequence desync (Terrapin-style) | **Dead** | get_seq_no++ at 3469 is AFTER MAC check; failed MAC throws before increment |
| SSH_MSG_IGNORE MAC bypass | **Dead** | All message types go through get_binary_packet() MAC check before filter() |
| Memory exhaustion via packet_length | **Dead** | packet_length capped at 0x9000 (36KB) at line 3542 |
| State machine abuse / fail-open | **Dead** | reset_connection() nulls socket, clears bitmap, all crypto state |
| Protocol downgrade on MAC failure | **Dead** | Immediate disconnect, no fallback or renegotiation |
| Padding oracle chain (Lucky13) | **Dead** | MAC check (3405) is BEFORE padding interpretation (3418) |
| SFTP subsystem bypass | **Dead** | SFTP uses same SSH2 transport, same MAC verification |
| BigInteger type confusion | **Dead** | Engine selected at construction, not per-packet |
| Pre-auth reachability | Yes, but irrelevant | One guess per connection with fresh keys = no oracle |

## Devil's advocate review

Every objection I could think of, addressed:

**"This is just a code smell. Show me a real exploit."**
Acknowledged. The report does not claim remote exploitability. It is submitted as Low / defense-in-depth, consistent with how similar findings are treated in other cryptographic libraries (see e.g. OpenSSH commits replacing `memcmp()` with `timingsafe_bcmp` for similar reasons).

**"PHP's `!=` might not even short-circuit — you're just seeing noise."**
PoC 2 rules this out. Timing scales monotonically and nearly linearly with mismatch position across a 128x range of string lengths (32 bytes → 4096 bytes). That is not noise.

**"SSH disconnects on MAC failure, so you only get one sample. Case closed."**
Correct, and the report says so explicitly. This is why the severity is Low rather than High.

**"There is no adaptive probe because session keys rotate per connection."**
Correct, and the report says so explicitly. This is the primary reason the network attack is infeasible.

**"Is this Lucky13-style? Does the MAC check happen after padding?"**
No. MAC verification at `SSH2.php:3399-3414` runs BEFORE any padding interpretation. Padding length is only read at line 3418, strictly after the MAC check. There is no unpadding oracle here. (Lucky13 in phpseclib's AES-CBC decrypt path is a separate, already-fixed issue — CVE-2026-32935.)

**"Maybe the `get_seq_no` or nonce path somehow enables forgery."**
No. The seq number is deterministic (incremented by one per packet) and the nonce (for UMAC) is derived from it. Neither is attacker-controlled in any useful sense. The MAC key is the secret, and it is per-connection.

**"Is this already reported?"**
Searched published advisories (`gh api repos/phpseclib/phpseclib/security-advisories`). Only CVE-2026-32935 is published, for a different code path (AES-CBC padding oracle after MAC verification). The SSH2 MAC comparison issue is not covered by any published advisory. The fix commit for CVE-2026-32935 (`ccc21aef71eb170e9bf819b167e67d1fd9e6e788`) did not touch `SSH2.php:3405` or `:3410`.

**"Does the project's threat model even consider this in scope?"**
SECURITY.md says "To report a security vulnerability, please use the Tidelift security contact." It does not exclude timing side-channels. The maintainer has already fixed constant-time comparison issues in other parts of the library (RSA, OAEP, AES-CBC padding) and uses `hash_equals()` in 9 other places. This issue is consistent with the maintainer's existing security posture, and the fix is trivial.

**"Is the Low severity appropriate? Could it be informational?"**
Low is appropriate. "Informational" would be for something that is provably no-impact. This is a demonstrable CWE-208 instance on secret-dependent data. It scores 3.7 under CVSS v3.1 with AC:H and C:L. That is Low, not Informational. The recent CVE-2026-32935 is assigned for a timing-side-channel in the same file category and given CVSS 4.0 = 8.2 (their vector is more severe because padding oracle actually recovers plaintext). This one would score lower than that, which matches the Low designation.

**"Would a maintainer just close this?"**
Unlikely. The fix is a one-liner, there is no behavioral change, it aligns with existing code style in the same codebase, and it silences future audit findings. The maintainer has a track record of accepting similar hardening patches. If they close it, the reason would likely be "we already know, not worth a CVE" — which would still leave the code fixed, which is the goal.

## Suggested reporting path

GitHub PVR is enabled for phpseclib/phpseclib (`{"enabled":true}`). SECURITY.md says to use the Tidelift contact, but GitHub PVR is a reasonable alternative and lets the maintainer decide whether to coordinate with Tidelift. Either path is acceptable.

Given the Low severity, this could also be filed as a public pull request rather than a security advisory. That would be faster for everyone and avoids using the private disclosure channel for a hardening fix.

## Files

- `poc/01_verify_variable_time.php` — baseline 32-byte timing measurement
- `poc/02_scaling_test.php` — decisive scaling test across string lengths
- `poc/03_hash_equals_scaling.php` — `!=` vs `hash_equals()` comparison
- `poc/04_phpseclib_in_context.php` — end-to-end repro using phpseclib's `Crypt\Hash`
- `notes.md` — research notes, dead ends, escalation angles considered
- `prior-work.md` — prior work search results
- `status.json` — machine-readable status

Koda Reef
references
0
reference_url https://api.first.org/data/v1/epss?cve=CVE-2026-40194
reference_id
reference_type
scores
0
value 0.0001
scoring_system epss
scoring_elements 0.01005
published_at 2026-04-13T12:55:00Z
1
value 0.0001
scoring_system epss
scoring_elements 0.0101
published_at 2026-04-11T12:55:00Z
2
value 0.00013
scoring_system epss
scoring_elements 0.01982
published_at 2026-04-21T12:55:00Z
3
value 0.00013
scoring_system epss
scoring_elements 0.01895
published_at 2026-04-18T12:55:00Z
4
value 0.00013
scoring_system epss
scoring_elements 0.01897
published_at 2026-04-16T12:55:00Z
url https://api.first.org/data/v1/epss?cve=CVE-2026-40194
1
reference_url https://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2026-40194
reference_id
reference_type
scores
url https://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2026-40194
2
reference_url https://github.com/phpseclib/phpseclib
reference_id
reference_type
scores
0
value 3.7
scoring_system cvssv3.1
scoring_elements CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:L/I:N/A:N
1
value LOW
scoring_system generic_textual
scoring_elements
url https://github.com/phpseclib/phpseclib
3
reference_url https://github.com/phpseclib/phpseclib/commit/ffe48b6b1b1af6963327f0a5330e3aa004a194ac
reference_id
reference_type
scores
0
value 3.7
scoring_system cvssv3.1
scoring_elements CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:L/I:N/A:N
1
value LOW
scoring_system generic_textual
scoring_elements
2
value Track
scoring_system ssvc
scoring_elements SSVCv2/E:P/A:N/T:P/P:M/B:A/M:M/D:T/2026-04-13T15:28:24Z/
url https://github.com/phpseclib/phpseclib/commit/ffe48b6b1b1af6963327f0a5330e3aa004a194ac
4
reference_url https://github.com/phpseclib/phpseclib/releases/tag/1.0.28
reference_id
reference_type
scores
0
value 3.7
scoring_system cvssv3.1
scoring_elements CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:L/I:N/A:N
1
value LOW
scoring_system generic_textual
scoring_elements
2
value Track
scoring_system ssvc
scoring_elements SSVCv2/E:P/A:N/T:P/P:M/B:A/M:M/D:T/2026-04-13T15:28:24Z/
url https://github.com/phpseclib/phpseclib/releases/tag/1.0.28
5
reference_url https://github.com/phpseclib/phpseclib/releases/tag/2.0.53
reference_id
reference_type
scores
0
value 3.7
scoring_system cvssv3.1
scoring_elements CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:L/I:N/A:N
1
value LOW
scoring_system generic_textual
scoring_elements
2
value Track
scoring_system ssvc
scoring_elements SSVCv2/E:P/A:N/T:P/P:M/B:A/M:M/D:T/2026-04-13T15:28:24Z/
url https://github.com/phpseclib/phpseclib/releases/tag/2.0.53
6
reference_url https://github.com/phpseclib/phpseclib/releases/tag/3.0.51
reference_id
reference_type
scores
0
value 3.7
scoring_system cvssv3.1
scoring_elements CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:L/I:N/A:N
1
value LOW
scoring_system generic_textual
scoring_elements
2
value Track
scoring_system ssvc
scoring_elements SSVCv2/E:P/A:N/T:P/P:M/B:A/M:M/D:T/2026-04-13T15:28:24Z/
url https://github.com/phpseclib/phpseclib/releases/tag/3.0.51
7
reference_url https://github.com/phpseclib/phpseclib/security/advisories/GHSA-r854-jrxh-36qx
reference_id
reference_type
scores
0
value 3.7
scoring_system cvssv3.1
scoring_elements CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:L/I:N/A:N
1
value LOW
scoring_system cvssv3.1_qr
scoring_elements
2
value LOW
scoring_system generic_textual
scoring_elements
3
value Track
scoring_system ssvc
scoring_elements SSVCv2/E:P/A:N/T:P/P:M/B:A/M:M/D:T/2026-04-13T15:28:24Z/
url https://github.com/phpseclib/phpseclib/security/advisories/GHSA-r854-jrxh-36qx
8
reference_url https://nvd.nist.gov/vuln/detail/CVE-2026-40194
reference_id
reference_type
scores
0
value 3.7
scoring_system cvssv3.1
scoring_elements CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:L/I:N/A:N
1
value LOW
scoring_system generic_textual
scoring_elements
url https://nvd.nist.gov/vuln/detail/CVE-2026-40194
9
reference_url https://github.com/advisories/GHSA-r854-jrxh-36qx
reference_id GHSA-r854-jrxh-36qx
reference_type
scores
0
value LOW
scoring_system cvssv3.1_qr
scoring_elements
url https://github.com/advisories/GHSA-r854-jrxh-36qx
fixed_packages
0
url pkg:composer/phpseclib/phpseclib@2.0.53
purl pkg:composer/phpseclib/phpseclib@2.0.53
is_vulnerable false
affected_by_vulnerabilities
resource_url http://public2.vulnerablecode.io/packages/pkg:composer/phpseclib/phpseclib@2.0.53
1
url pkg:composer/phpseclib/phpseclib@3.0.51
purl pkg:composer/phpseclib/phpseclib@3.0.51
is_vulnerable false
affected_by_vulnerabilities
resource_url http://public2.vulnerablecode.io/packages/pkg:composer/phpseclib/phpseclib@3.0.51
aliases CVE-2026-40194, GHSA-r854-jrxh-36qx
risk_score 1.6
exploitability 0.5
weighted_severity 3.3
resource_url http://public2.vulnerablecode.io/vulnerabilities/VCID-hnn9-wcwe-ffa5
4
url VCID-ku5e-5j7s-qyc9
vulnerability_id VCID-ku5e-5j7s-qyc9
summary
phpseclib's AES-CBC unpadding susceptible to padding oracle timing attack
### Impact
Those using AES in CBC mode may be susceptible to a padding oracle timing attack.

### Patches
https://github.com/phpseclib/phpseclib/commit/ccc21aef71eb170e9bf819b167e67d1fd9e6e788

### Workarounds
Use AES in CTR, CFB or OFB modes
references
0
reference_url https://api.first.org/data/v1/epss?cve=CVE-2026-32935
reference_id
reference_type
scores
0
value 0.00014
scoring_system epss
scoring_elements 0.02587
published_at 2026-04-16T12:55:00Z
1
value 0.00014
scoring_system epss
scoring_elements 0.02604
published_at 2026-04-13T12:55:00Z
2
value 0.00014
scoring_system epss
scoring_elements 0.02595
published_at 2026-04-18T12:55:00Z
3
value 0.00015
scoring_system epss
scoring_elements 0.02838
published_at 2026-04-07T12:55:00Z
4
value 0.00015
scoring_system epss
scoring_elements 0.0284
published_at 2026-04-08T12:55:00Z
5
value 0.00015
scoring_system epss
scoring_elements 0.02816
published_at 2026-04-02T12:55:00Z
6
value 0.00015
scoring_system epss
scoring_elements 0.0283
published_at 2026-04-11T12:55:00Z
7
value 0.00015
scoring_system epss
scoring_elements 0.02811
published_at 2026-04-12T12:55:00Z
8
value 0.00015
scoring_system epss
scoring_elements 0.02861
published_at 2026-04-09T12:55:00Z
9
value 0.0002
scoring_system epss
scoring_elements 0.05315
published_at 2026-04-21T12:55:00Z
url https://api.first.org/data/v1/epss?cve=CVE-2026-32935
1
reference_url https://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2026-32935
reference_id
reference_type
scores
url https://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2026-32935
2
reference_url https://github.com/phpseclib/phpseclib
reference_id
reference_type
scores
0
value 8.2
scoring_system cvssv4
scoring_elements CVSS:4.0/AV:N/AC:H/AT:N/PR:N/UI:N/VC:H/VI:N/VA:N/SC:N/SI:N/SA:N
1
value HIGH
scoring_system generic_textual
scoring_elements
url https://github.com/phpseclib/phpseclib
3
reference_url https://github.com/phpseclib/phpseclib/commit/ccc21aef71eb170e9bf819b167e67d1fd9e6e788
reference_id
reference_type
scores
0
value 8.2
scoring_system cvssv4
scoring_elements CVSS:4.0/AV:N/AC:H/AT:N/PR:N/UI:N/VC:H/VI:N/VA:N/SC:N/SI:N/SA:N
1
value HIGH
scoring_system generic_textual
scoring_elements
2
value Track
scoring_system ssvc
scoring_elements SSVCv2/E:N/A:N/T:P/P:M/B:A/M:M/D:T/2026-03-20T16:31:59Z/
url https://github.com/phpseclib/phpseclib/commit/ccc21aef71eb170e9bf819b167e67d1fd9e6e788
4
reference_url https://github.com/phpseclib/phpseclib/security/advisories/GHSA-94g3-g5v7-q4jg
reference_id
reference_type
scores
0
value HIGH
scoring_system cvssv3.1_qr
scoring_elements
1
value 8.2
scoring_system cvssv4
scoring_elements CVSS:4.0/AV:N/AC:H/AT:N/PR:N/UI:N/VC:H/VI:N/VA:N/SC:N/SI:N/SA:N
2
value HIGH
scoring_system generic_textual
scoring_elements
3
value Track
scoring_system ssvc
scoring_elements SSVCv2/E:N/A:N/T:P/P:M/B:A/M:M/D:T/2026-03-20T16:31:59Z/
url https://github.com/phpseclib/phpseclib/security/advisories/GHSA-94g3-g5v7-q4jg
5
reference_url https://nvd.nist.gov/vuln/detail/CVE-2026-32935
reference_id
reference_type
scores
0
value 8.2
scoring_system cvssv4
scoring_elements CVSS:4.0/AV:N/AC:H/AT:N/PR:N/UI:N/VC:H/VI:N/VA:N/SC:N/SI:N/SA:N
1
value HIGH
scoring_system generic_textual
scoring_elements
url https://nvd.nist.gov/vuln/detail/CVE-2026-32935
6
reference_url https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=1131482
reference_id 1131482
reference_type
scores
url https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=1131482
7
reference_url https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=1131483
reference_id 1131483
reference_type
scores
url https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=1131483
8
reference_url https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=1131484
reference_id 1131484
reference_type
scores
url https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=1131484
9
reference_url https://github.com/advisories/GHSA-94g3-g5v7-q4jg
reference_id GHSA-94g3-g5v7-q4jg
reference_type
scores
0
value HIGH
scoring_system cvssv3.1_qr
scoring_elements
url https://github.com/advisories/GHSA-94g3-g5v7-q4jg
fixed_packages
0
url pkg:composer/phpseclib/phpseclib@2.0.52
purl pkg:composer/phpseclib/phpseclib@2.0.52
is_vulnerable false
affected_by_vulnerabilities
resource_url http://public2.vulnerablecode.io/packages/pkg:composer/phpseclib/phpseclib@2.0.52
1
url pkg:composer/phpseclib/phpseclib@3.0.50
purl pkg:composer/phpseclib/phpseclib@3.0.50
is_vulnerable false
affected_by_vulnerabilities
resource_url http://public2.vulnerablecode.io/packages/pkg:composer/phpseclib/phpseclib@3.0.50
aliases CVE-2026-32935, GHSA-94g3-g5v7-q4jg
risk_score 4.0
exploitability 0.5
weighted_severity 8.0
resource_url http://public2.vulnerablecode.io/vulnerabilities/VCID-ku5e-5j7s-qyc9
5
url VCID-ndjx-6ned-93bd
vulnerability_id VCID-ndjx-6ned-93bd
summary
Improper Certificate Validation in phpseclib
phpseclib before 2.0.31 and 3.x before 3.0.7 mishandles RSA PKCS#1 v1.5 signature verification.
references
0
reference_url https://api.first.org/data/v1/epss?cve=CVE-2021-30130
reference_id
reference_type
scores
0
value 0.00595
scoring_system epss
scoring_elements 0.69353
published_at 2026-04-16T12:55:00Z
1
value 0.00595
scoring_system epss
scoring_elements 0.69343
published_at 2026-04-21T12:55:00Z
2
value 0.00595
scoring_system epss
scoring_elements 0.69363
published_at 2026-04-18T12:55:00Z
3
value 0.00595
scoring_system epss
scoring_elements 0.69257
published_at 2026-04-01T12:55:00Z
4
value 0.00595
scoring_system epss
scoring_elements 0.6927
published_at 2026-04-02T12:55:00Z
5
value 0.00595
scoring_system epss
scoring_elements 0.69288
published_at 2026-04-04T12:55:00Z
6
value 0.00595
scoring_system epss
scoring_elements 0.69269
published_at 2026-04-07T12:55:00Z
7
value 0.00595
scoring_system epss
scoring_elements 0.69318
published_at 2026-04-08T12:55:00Z
8
value 0.00595
scoring_system epss
scoring_elements 0.69336
published_at 2026-04-09T12:55:00Z
9
value 0.00595
scoring_system epss
scoring_elements 0.69358
published_at 2026-04-11T12:55:00Z
10
value 0.00595
scoring_system epss
scoring_elements 0.69342
published_at 2026-04-12T12:55:00Z
11
value 0.00595
scoring_system epss
scoring_elements 0.69314
published_at 2026-04-13T12:55:00Z
url https://api.first.org/data/v1/epss?cve=CVE-2021-30130
1
reference_url https://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2021-30130
reference_id
reference_type
scores
url https://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2021-30130
2
reference_url https://github.com/FriendsOfPHP/security-advisories/blob/master/phpseclib/phpseclib/CVE-2021-30130.yaml
reference_id
reference_type
scores
0
value 7.5
scoring_system cvssv3.1
scoring_elements CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:H/A:N
1
value HIGH
scoring_system generic_textual
scoring_elements
url https://github.com/FriendsOfPHP/security-advisories/blob/master/phpseclib/phpseclib/CVE-2021-30130.yaml
3
reference_url https://github.com/phpseclib/phpseclib/pull/1635
reference_id
reference_type
scores
0
value 7.5
scoring_system cvssv3.1
scoring_elements CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:H/A:N
1
value HIGH
scoring_system generic_textual
scoring_elements
url https://github.com/phpseclib/phpseclib/pull/1635
4
reference_url https://github.com/phpseclib/phpseclib/releases/tag/2.0.31
reference_id
reference_type
scores
0
value 7.5
scoring_system cvssv3.1
scoring_elements CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:H/A:N
1
value HIGH
scoring_system generic_textual
scoring_elements
url https://github.com/phpseclib/phpseclib/releases/tag/2.0.31
5
reference_url https://github.com/phpseclib/phpseclib/releases/tag/3.0.7
reference_id
reference_type
scores
0
value 7.5
scoring_system cvssv3.1
scoring_elements CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:H/A:N
1
value HIGH
scoring_system generic_textual
scoring_elements
url https://github.com/phpseclib/phpseclib/releases/tag/3.0.7
6
reference_url https://lists.debian.org/debian-lts-announce/2022/11/msg00024.html
reference_id
reference_type
scores
0
value 7.5
scoring_system cvssv3.1
scoring_elements CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:H/A:N
1
value HIGH
scoring_system generic_textual
scoring_elements
url https://lists.debian.org/debian-lts-announce/2022/11/msg00024.html
7
reference_url https://lists.debian.org/debian-lts-announce/2022/11/msg00025.html
reference_id
reference_type
scores
0
value 7.5
scoring_system cvssv3.1
scoring_elements CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:H/A:N
1
value HIGH
scoring_system generic_textual
scoring_elements
url https://lists.debian.org/debian-lts-announce/2022/11/msg00025.html
8
reference_url https://nvd.nist.gov/vuln/detail/CVE-2021-30130
reference_id
reference_type
scores
0
value 7.5
scoring_system cvssv3.1
scoring_elements CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:H/A:N
1
value HIGH
scoring_system generic_textual
scoring_elements
url https://nvd.nist.gov/vuln/detail/CVE-2021-30130
9
reference_url https://github.com/advisories/GHSA-vf4w-fg7r-5v94
reference_id GHSA-vf4w-fg7r-5v94
reference_type
scores
0
value HIGH
scoring_system cvssv3.1_qr
scoring_elements
url https://github.com/advisories/GHSA-vf4w-fg7r-5v94
10
reference_url https://usn.ubuntu.com/7404-1/
reference_id USN-7404-1
reference_type
scores
url https://usn.ubuntu.com/7404-1/
fixed_packages
0
url pkg:composer/phpseclib/phpseclib@2.0.31
purl pkg:composer/phpseclib/phpseclib@2.0.31
is_vulnerable true
affected_by_vulnerabilities
0
vulnerability VCID-6xjw-f9xu-fkg8
1
vulnerability VCID-8h2u-szq5-13ar
2
vulnerability VCID-ars3-xpyv-jbf1
resource_url http://public2.vulnerablecode.io/packages/pkg:composer/phpseclib/phpseclib@2.0.31
1
url pkg:composer/phpseclib/phpseclib@3.0.7
purl pkg:composer/phpseclib/phpseclib@3.0.7
is_vulnerable true
affected_by_vulnerabilities
0
vulnerability VCID-6xjw-f9xu-fkg8
1
vulnerability VCID-8h2u-szq5-13ar
2
vulnerability VCID-ars3-xpyv-jbf1
3
vulnerability VCID-wnyn-2dp2-uuer
4
vulnerability VCID-zxph-sjym-kqhg
resource_url http://public2.vulnerablecode.io/packages/pkg:composer/phpseclib/phpseclib@3.0.7
aliases CVE-2021-30130, GHSA-vf4w-fg7r-5v94
risk_score 4.0
exploitability 0.5
weighted_severity 8.0
resource_url http://public2.vulnerablecode.io/vulnerabilities/VCID-ndjx-6ned-93bd
Fixing_vulnerabilities
Risk_score4.0
Resource_urlhttp://public2.vulnerablecode.io/packages/pkg:composer/phpseclib/phpseclib@2.0.0