Refine your search

2 vulnerabilities found for by phpseclib

CVE-2026-40194 (GCVE-0-2026-40194)
Vulnerability from cvelistv5
Published
2026-04-10 20:24
Modified
2026-04-13 15:35
CWE
  • CWE-208 - Observable Timing Discrepancy
Summary
phpseclib is a PHP secure communications library. 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.
Impacted products
Vendor Product Version
phpseclib phpseclib Version: < 1.0.28
Version: >= 2.0.0, < 2.0.53
Version: >= 3.0.0, < 3.0.51
Create a notification for this product.
Show details on NVD website


{
  "containers": {
    "adp": [
      {
        "metrics": [
          {
            "other": {
              "content": {
                "id": "CVE-2026-40194",
                "options": [
                  {
                    "Exploitation": "poc"
                  },
                  {
                    "Automatable": "no"
                  },
                  {
                    "Technical Impact": "partial"
                  }
                ],
                "role": "CISA Coordinator",
                "timestamp": "2026-04-13T15:28:24.152831Z",
                "version": "2.0.3"
              },
              "type": "ssvc"
            }
          }
        ],
        "providerMetadata": {
          "dateUpdated": "2026-04-13T15:35:24.775Z",
          "orgId": "134c704f-9b21-4f2e-91b3-4a467353bcc0",
          "shortName": "CISA-ADP"
        },
        "references": [
          {
            "tags": [
              "exploit"
            ],
            "url": "https://github.com/phpseclib/phpseclib/security/advisories/GHSA-r854-jrxh-36qx"
          }
        ],
        "title": "CISA ADP Vulnrichment"
      }
    ],
    "cna": {
      "affected": [
        {
          "product": "phpseclib",
          "vendor": "phpseclib",
          "versions": [
            {
              "status": "affected",
              "version": "\u003c 1.0.28"
            },
            {
              "status": "affected",
              "version": "\u003e= 2.0.0, \u003c 2.0.53"
            },
            {
              "status": "affected",
              "version": "\u003e= 3.0.0, \u003c 3.0.51"
            }
          ]
        }
      ],
      "descriptions": [
        {
          "lang": "en",
          "value": "phpseclib is a PHP secure communications library. Prior to 3.0.51, 2.0.53, and 1.0.28, phpseclib\\Net\\SSH2::get_binary_packet() uses PHP\u0027s != 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."
        }
      ],
      "metrics": [
        {
          "cvssV3_1": {
            "attackComplexity": "HIGH",
            "attackVector": "NETWORK",
            "availabilityImpact": "NONE",
            "baseScore": 3.7,
            "baseSeverity": "LOW",
            "confidentialityImpact": "LOW",
            "integrityImpact": "NONE",
            "privilegesRequired": "NONE",
            "scope": "UNCHANGED",
            "userInteraction": "NONE",
            "vectorString": "CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:L/I:N/A:N",
            "version": "3.1"
          }
        }
      ],
      "problemTypes": [
        {
          "descriptions": [
            {
              "cweId": "CWE-208",
              "description": "CWE-208: Observable Timing Discrepancy",
              "lang": "en",
              "type": "CWE"
            }
          ]
        }
      ],
      "providerMetadata": {
        "dateUpdated": "2026-04-10T20:24:06.696Z",
        "orgId": "a0819718-46f1-4df5-94e2-005712e83aaa",
        "shortName": "GitHub_M"
      },
      "references": [
        {
          "name": "https://github.com/phpseclib/phpseclib/security/advisories/GHSA-r854-jrxh-36qx",
          "tags": [
            "x_refsource_CONFIRM"
          ],
          "url": "https://github.com/phpseclib/phpseclib/security/advisories/GHSA-r854-jrxh-36qx"
        },
        {
          "name": "https://github.com/phpseclib/phpseclib/commit/ffe48b6b1b1af6963327f0a5330e3aa004a194ac",
          "tags": [
            "x_refsource_MISC"
          ],
          "url": "https://github.com/phpseclib/phpseclib/commit/ffe48b6b1b1af6963327f0a5330e3aa004a194ac"
        },
        {
          "name": "https://github.com/phpseclib/phpseclib/releases/tag/1.0.28",
          "tags": [
            "x_refsource_MISC"
          ],
          "url": "https://github.com/phpseclib/phpseclib/releases/tag/1.0.28"
        },
        {
          "name": "https://github.com/phpseclib/phpseclib/releases/tag/2.0.53",
          "tags": [
            "x_refsource_MISC"
          ],
          "url": "https://github.com/phpseclib/phpseclib/releases/tag/2.0.53"
        },
        {
          "name": "https://github.com/phpseclib/phpseclib/releases/tag/3.0.51",
          "tags": [
            "x_refsource_MISC"
          ],
          "url": "https://github.com/phpseclib/phpseclib/releases/tag/3.0.51"
        }
      ],
      "source": {
        "advisory": "GHSA-r854-jrxh-36qx",
        "discovery": "UNKNOWN"
      },
      "title": "phpseclib has a variable-time HMAC comparison in SSH2::get_binary_packet() using != instead of hash_equals()"
    }
  },
  "cveMetadata": {
    "assignerOrgId": "a0819718-46f1-4df5-94e2-005712e83aaa",
    "assignerShortName": "GitHub_M",
    "cveId": "CVE-2026-40194",
    "datePublished": "2026-04-10T20:24:06.696Z",
    "dateReserved": "2026-04-09T20:59:17.620Z",
    "dateUpdated": "2026-04-13T15:35:24.775Z",
    "state": "PUBLISHED"
  },
  "dataType": "CVE_RECORD",
  "dataVersion": "5.2"
}

CVE-2026-32935 (GCVE-0-2026-32935)
Vulnerability from cvelistv5
Published
2026-03-20 02:48
Modified
2026-03-20 16:32
CWE
  • CWE-208 - Observable Timing Discrepancy
Summary
phpseclib is a PHP secure communications library. Projects using versions 1.0.26 and below, 2.0.0 through 2.0.51, and 3.0.0 through 3.0.49 are vulnerable to a to padding oracle timing attack when using AES in CBC mode. This issue has been fixed in versions 1.0.27, 2.0.52 and 3.0.50.
Impacted products
Vendor Product Version
phpseclib phpseclib Version: >= 3.0.0, < 3.0.50
Version: >= 2.0.0, < 2.0.52
Version: < 1.0.27
Create a notification for this product.
Show details on NVD website


{
  "containers": {
    "adp": [
      {
        "metrics": [
          {
            "other": {
              "content": {
                "id": "CVE-2026-32935",
                "options": [
                  {
                    "Exploitation": "none"
                  },
                  {
                    "Automatable": "no"
                  },
                  {
                    "Technical Impact": "partial"
                  }
                ],
                "role": "CISA Coordinator",
                "timestamp": "2026-03-20T16:31:59.292752Z",
                "version": "2.0.3"
              },
              "type": "ssvc"
            }
          }
        ],
        "providerMetadata": {
          "dateUpdated": "2026-03-20T16:32:34.194Z",
          "orgId": "134c704f-9b21-4f2e-91b3-4a467353bcc0",
          "shortName": "CISA-ADP"
        },
        "title": "CISA ADP Vulnrichment"
      }
    ],
    "cna": {
      "affected": [
        {
          "product": "phpseclib",
          "vendor": "phpseclib",
          "versions": [
            {
              "status": "affected",
              "version": "\u003e= 3.0.0, \u003c 3.0.50"
            },
            {
              "status": "affected",
              "version": "\u003e= 2.0.0, \u003c 2.0.52"
            },
            {
              "status": "affected",
              "version": "\u003c 1.0.27"
            }
          ]
        }
      ],
      "descriptions": [
        {
          "lang": "en",
          "value": "phpseclib is a PHP secure communications library. Projects using versions 1.0.26 and below, 2.0.0 through 2.0.51, and 3.0.0 through 3.0.49 are vulnerable to a to padding oracle timing attack when using AES in CBC mode. This issue has been fixed in versions 1.0.27, 2.0.52 and 3.0.50."
        }
      ],
      "metrics": [
        {
          "cvssV4_0": {
            "attackComplexity": "HIGH",
            "attackRequirements": "NONE",
            "attackVector": "NETWORK",
            "baseScore": 8.2,
            "baseSeverity": "HIGH",
            "privilegesRequired": "NONE",
            "subAvailabilityImpact": "NONE",
            "subConfidentialityImpact": "NONE",
            "subIntegrityImpact": "NONE",
            "userInteraction": "NONE",
            "vectorString": "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",
            "version": "4.0",
            "vulnAvailabilityImpact": "NONE",
            "vulnConfidentialityImpact": "HIGH",
            "vulnIntegrityImpact": "NONE"
          }
        }
      ],
      "problemTypes": [
        {
          "descriptions": [
            {
              "cweId": "CWE-208",
              "description": "CWE-208: Observable Timing Discrepancy",
              "lang": "en",
              "type": "CWE"
            }
          ]
        }
      ],
      "providerMetadata": {
        "dateUpdated": "2026-03-20T02:48:59.778Z",
        "orgId": "a0819718-46f1-4df5-94e2-005712e83aaa",
        "shortName": "GitHub_M"
      },
      "references": [
        {
          "name": "https://github.com/phpseclib/phpseclib/security/advisories/GHSA-94g3-g5v7-q4jg",
          "tags": [
            "x_refsource_CONFIRM"
          ],
          "url": "https://github.com/phpseclib/phpseclib/security/advisories/GHSA-94g3-g5v7-q4jg"
        },
        {
          "name": "https://github.com/phpseclib/phpseclib/commit/ccc21aef71eb170e9bf819b167e67d1fd9e6e788",
          "tags": [
            "x_refsource_MISC"
          ],
          "url": "https://github.com/phpseclib/phpseclib/commit/ccc21aef71eb170e9bf819b167e67d1fd9e6e788"
        }
      ],
      "source": {
        "advisory": "GHSA-94g3-g5v7-q4jg",
        "discovery": "UNKNOWN"
      },
      "title": "phpseclib\u0027s AES-CBC unpadding susceptible to padding oracle timing attack"
    }
  },
  "cveMetadata": {
    "assignerOrgId": "a0819718-46f1-4df5-94e2-005712e83aaa",
    "assignerShortName": "GitHub_M",
    "cveId": "CVE-2026-32935",
    "datePublished": "2026-03-20T02:48:59.778Z",
    "dateReserved": "2026-03-17T00:05:53.282Z",
    "dateUpdated": "2026-03-20T16:32:34.194Z",
    "state": "PUBLISHED"
  },
  "dataType": "CVE_RECORD",
  "dataVersion": "5.2"
}