Bug 2267497 (CVE-2024-27354)

Summary: CVE-2024-27354 php-phpseclib: denial of service
Product: [Other] Security Response Reporter: ybuenos
Component: vulnerabilityAssignee: Product Security <prodsec-ir-bot>
Status: NEW --- QA Contact:
Severity: medium Docs Contact:
Priority: medium    
Version: unspecifiedKeywords: Security
Target Milestone: ---   
Target Release: ---   
Hardware: All   
OS: Linux   
Whiteboard:
Fixed In Version: php-phpseclib 1.0.23, php-phpseclib 2.0.47, php-phpseclib 3.0.36 Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Bug Depends On: 2267499, 2267498    
Bug Blocks:    

Description ybuenos 2024-03-03 07:56:21 UTC
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.

https://gist.github.com/katzj/ee72f3c2a00590812b2ea3c0c8890e0b
https://github.com/phpseclib/phpseclib/blob/master/phpseclib/Math/PrimeField.php#L49

Comment 1 ybuenos 2024-03-03 07:56:39 UTC
Created php-phpseclib tracking bugs for this issue:

Affects: epel-all [bug 2267499]
Affects: fedora-all [bug 2267498]