Skip to content
Noroxi
NVD / CVE Program· CNA GitHub_M

CVE-2026-40194: phpseclib has a variable-time HMAC comparison in SSH2::get_binary_packet() using != instead of hash_equals()

Noroxi assessment

Priority: Monitor (action score 14/100)

  • The sources we track (CISA KEV, Exploit-DB, Metasploit, Nuclei, GitHub) show no public exploit code or exploitation in the wild.
  • Probability of exploitation in the next 30 days: 0.36% (FIRST EPSS).
  • Anyone who can reach it over the internet can trigger it. No account or password is required. No user action is required. Special conditions such as timing or configuration are required.
  • Fixed version: phpseclib phpseclib 3.0.51.

Low priority for now. Upgrade to phpseclib phpseclib 3.0.51 or later.

Generated automatically from the record's data: CVSS (NVD and CNA), CISA KEV and SSVC, FIRST EPSS, exploit sources, fixed versions. How we calculate it

Primary sources: NVD · CVE.org · FIRST EPSS

phpseclib is a PHP secure communications library. Starting in 0.1.1 and prior to 3.0.51, 2.0.53, and 1.0.28, 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. This vulnerability is fixed in 3.0.51, 2.0.53, and 1.0.28.

LowCVSS 3.7 · v3.1—No exploit Fix available
Published
Apr 10, 2026
Updated
Jun 17, 2026
EPSS
0.3% · 29th percentile

Report tools

JSON

Action score

14

Monitor

Low priority for now.

CVSS
14 / 40 · 3.7 / 10
CISA KEV
0 / 30 · Not listed
EPSS
0 / 30 · 0.3%

CISA SSVC decision

Exploitation
proof of concept
Automatable
no
Technical impact
partial

Vulnrichment: CISA's decision-tree inputs.

CNA vs NVD score

NVD
—
CNA · GitHub_M
3.7
NVD has not scored this yet; the score shown is the CNA’s.

The score given by the assigning authority versus NVD’s independent score. A gap means the severity is contested.

Get told when this record changes

  • Not in KEV: no record of exploitation in the wild
  • No public exploit code on record
  • A fix has been released

If any of these changes, we'll tell you in the daily email digest.

Follow CVE-2026-40194

When you'll hear from us

  • when it enters CISA KEV
  • when exploit code appears or is weaponized
  • when the record is updated (including a fixed version)
  • when EPSS rises 20 points in a week

One daily email digest (06:00 UTC); connect a webhook for KEV listings and weaponized exploits instantly.

Your free account also gets you

Running WordPress? Scan your site free with WP Lens

  • Stack alerts: add the products and versions you run, get the new CVEs that affect them
  • Uptime monitoring: 1 site, instant email when it goes down
  • Add your domain: subdomains and takeover risk scanned every week (1 domain)
  • 10 scans an hour on the security tools (3 a day without an account), an API key and MCP
  • All your scans in one panel: findings, what changed in the last scan, a report per domain or per client (PDF, share link)
All free tools

Sign up with email · Have an account? Sign in

Free account, no card. Unfollow any time.

Running WordPress? Scan your site free with WP Lens

Is your version affected? Check it

Noroxi analysis

What does it mean in your environment?

The assessment above is generated automatically from the record's data; it doesn't know your environment. Our team verifies on your systems whether this vulnerability is actually exploitable and which mitigation is enough.

We use this product, ask for help

Affected systems

Is your version affected?

Pick the product and type the version you run. It's compared with this record's version ranges in your browser; the version isn't sent anywhere.

VendorProduct
phpseclibphpseclib

Affected versions

NVD version ranges (for catalog products). Add the product to your stack with a version and matching uses these.

  • phpseclib phpseclibup to 1.0.27 inclusive
  • phpseclib phpseclib2.0.0 and later · before 2.0.53
  • phpseclib phpseclib3.0.0 and later · before 3.0.51

Versions reported by the vendor

Affected version ranges reported by the assigning authority (GitHub_M). Independent of NVD's CPE analysis and usually ahead of it.

  • phpseclib phpseclib

    • >= 0.1.1, < 1.0.28, >= 2.0.0, < 2.0.53, >= 3.0.0, < 3.0.51affected

Package-level exposure

OSV and GitHub Advisory data: ecosystem, package and range. SBOM matching uses this table.

EcosystemPackageAffected rangeFix
Debian:12php-phpseclibbefore 2.0.42-1+deb12u42.0.42-1+deb12u4
Debian:12php-phpseclib3before 3.0.19-1+deb12u53.0.19-1+deb12u5
Debian:12phpseclibbefore 1.0.20-1+deb12u41.0.20-1+deb12u4
Debian:13php-phpseclibbefore 2.0.48-3+deb13u22.0.48-3+deb13u2
Debian:13php-phpseclib3before 3.0.43-2+deb13u23.0.43-2+deb13u2
Debian:13phpseclibbefore 1.0.23-6+deb13u21.0.23-6+deb13u2
Debian:14php-phpseclibbefore 2.0.53-12.0.53-1
Debian:14php-phpseclib3before 3.0.51-13.0.51-1
Packagistphpseclib/phpseclibfrom 0.1.1 · before 1.0.281.0.28
Packagistphpseclib/phpseclibfrom 2.0.0 · before 2.0.532.0.53
Packagistphpseclib/phpseclibfrom 3.0.0 · before 3.0.513.0.51

Other highest-scoring records for the same primary product.

  • CVE-2026-32935phpseclib's AES-CBC unpadding susceptible to padding oracle timing attack
    32Monitor
  • CVE-2026-44167phpseclib: CVE-2024-27355 mitigation bypass — OID amplification DoS in ASN1::decodeOID()
    30Monitor
  • CVE-2023-52892In 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
    30Monitor

Published before and after this one in the same product

  • ← EarlierCVE-2024-27354Mar 1, 2024 · 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.
    30Monitor
  • ← EarlierCVE-2024-27355Mar 1, 2024 · 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.
    30Monitor
  • Later →CVE-2026-55599Jun 22, 2026 · phpseclib: X.509 certificate validation sends attacker-controlled outbound requests (server-side request forgery) via Authority Information Access
    23Monitor

Remediation

Which version to upgrade to

Fix versions compiled from the vendor, package registries and Microsoft. Verify the vendor's note before upgrading.

Product / packageFixed versionSource
phpseclib phpseclib3.0.51 · descriptionVendor (CNA)
debian:php-phpseclib2.0.42-1+deb12u4 · Debian:12Package registry (OSV)
debian:php-phpseclib33.0.19-1+deb12u5 · Debian:12Package registry (OSV)
debian:phpseclib1.0.20-1+deb12u4 · Debian:12Package registry (OSV)
Packagist:phpseclib/phpseclib1.0.28Package registry (OSV)
Packagist:phpseclib/phpseclib2.0.53Package registry (OSV)
Packagist:phpseclib/phpseclib3.0.51Package registry (OSV)

Exploit status

No known public exploit

No public exploit has been observed yet. That doesn't mean you're safe, only that the bar is a little higher.

Research context

For pentesters and researchers: attack profile, score disagreement, timeline, patch commits, credits, variant and chain candidates, bug bounty scope. All derived from existing data; no exploit code.

Timeline

From publication to today: proof of concept, Metasploit module, CISA KEV and fix record. Dates are as reported by the sources.

No dated events beyond publication.

EPSS, last 120 days

FIRST EPSS daily score; only changes of 0.01 or more are recorded (step chart).

Patch and commit links

Commit, PR and diff links among the references. A starting point for patch-diffing and variant hunting; fixes, not exploits.

Finders, reporters and analysts named in the CNA record. Click a name for that researcher’s other records.

No credits in the CNA record.

Variant candidates

Same product, same weakness class, within 18 months. If the patch missed the root cause, the sibling bug is here.

  • CVE-2026-3293522 days apartphpseclib's AES-CBC unpadding susceptible to padding oracle timing attack
    32Monitor
  • CVE-2026-84308144 days apartphpseclib — non-constant-time X25519 scalar multiplication permits full private-key recovery
    25Monitor

Chain candidates

An authentication bypass and a privilege-requiring bug in the same product, published close together: combined they may become an unauthenticated path.

—

Bug bounty scope

No known public program.

Source: bounty-targets-data (public HackerOne, Bugcrowd, Intigriti, YesWeHack listings).

Technical details

Attack conditions

  • Anyone who can reach it over the internet can trigger it.
  • No account or password is required.
  • No user action is required.
  • Special conditions such as timing or configuration are required.

If successful

Confidentiality
low · data can be read
Integrity
none
Availability
none
Attack vector
Network
Attack complexity
High
Privileges required
None
User interaction
None
Scope
Unchanged
Confidentiality impact
Low
Integrity impact
None
Availability impact
None

CVSS vector

CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:L/I:N/A:N

nvd-secondary

Attack context

MITRE CAPEC attack patterns and ATT&CK techniques for this weakness class (CWE). A starting point for detection rules and threat hunting.

Change log

  1. Fix✗ → ✓

For records you follow, these changes also arrive as notifications. →

References

All records