GHSA-346h-749j-r28w: Mdanter/ecc PHPECC Vulnerable To Multiple Cryptographic Vulnerability
CRITICALGHSA-346h-749j-r28w is a CRITICAL (CVSS 9.1) phpecc vulnerable to multiple cryptographic vulnerability (CWE-203: Observable Discrepancy) affecting Mdanter/ecc libraries in the Packagist ecosystem. The issue involves phpecc vulnerable to multiple cryptographic side-channel attacks. Remediation is available in the latest vendor maintenance releases.
GHSA-346h-749j-r28w at a Glance
Security Impact
CVSS: 9.1
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:H/A:N).
How to Fix GHSA-346h-749j-r28w
To remediate this vulnerability, upgrade all affected Mdanter/ecc 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 mdanter/ecc to Latest secure release
Run the following command in your project directory to verify that all resolved dependencies use the patched release:
inspect dependencies for mdanter/ecc
How to Check if You Are Affected
To determine whether your application is affected by GHSA-346h-749j-r28w, inspect your project dependencies for Mdanter/ecc:
inspect dependencies for mdanter/ecc
Analyze the terminal output to locate any version of Mdanter/ecc in your dependency tree. If any resolved version matches the vulnerable ranges listed in the table below (for example, versions earlier than the patched release), 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-203: Observable Discrepancy, where the product behaves differently or sends different responses under different circumstances in a way that is observable to an unauthorized actor. In Mdanter/ecc, 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
GHSA-346h-749j-r28w Affected Mdanter/ecc Versions
1 component(s)| Product / Package | Ecosystem | Affected Versions | Fixed Version |
|---|---|---|---|
|
mdanter/ecc
|
Packagist |
≤ 1.0.0
|
|
References
Frequently Asked Questions
What is GHSA-346h-749j-r28w?
Which Mdanter/ecc versions are affected?
What version fixes GHSA-346h-749j-r28w?
Is mdanter/ecc affected?
What is the CVSS score of GHSA-346h-749j-r28w?
What CWE is associated with GHSA-346h-749j-r28w?
How can I check Packagist dependencies for GHSA-346h-749j-r28w?
Machine-readable OSV JSON
OSV v1.5 Schema
{
"schema_version" : "1.4.0",
"id" : "GHSA-346h-749j-r28w",
"modified" : "2024-04-25T18:31:58Z",
"published" : "2024-04-25T18:31:58Z",
"aliases" : [ ],
"summary" : "PHPECC vulnerable to multiple cryptographic side-channel attacks",
"details" : "### ECDSA Canonicalization\n\nPHPECC is vulnerable to malleable ECDSA signature attacks. \n\n### Constant-Time Signer\n\nWhen generating a new ECDSA signature, the GMPMath adapter was used. This class wraps the GNU Multiple Precision arithmetic library (GMP), which does not aim to provide constant-time implementations of algorithms.\n\nAn attacker capable of triggering many signatures and studying the time it takes to perform each operation would be able to leak the secret number, `k`, and thereby learn the private key.\n\n### EcDH Timing Leaks\n\nWhen calculating a shared secret using the `EcDH` class, the scalar-point multiplication is based on the arithmetic defined by the `Point` class.\n\nEven though the library implements a Montgomery ladder, the `add()`, `mul()`, and `getDouble()` methods on the `Point` class are not constant-time. This means that your ECDH private keys are leaking information about each bit of your private key through a timing side-channel.",
"severity" : [ {
"type" : "CVSS_V3",
"score" : "CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:N"
} ],
"affected" : [ {
"package" : {
"ecosystem" : "Packagist",
"name" : "mdanter/ecc"
},
"ranges" : [ {
"type" : "ECOSYSTEM",
"events" : [ {
"introduced" : "0"
}, {
"last_affected" : "1.0.0"
} ]
} ]
} ],
"references" : [ {
"type" : "WEB",
"url" : "https://github.com/FriendsOfPHP/security-advisories/blob/master/mdanter/ecc/2024-04-24.yaml"
}, {
"type" : "WEB",
"url" : "https://github.com/paragonie/phpecc/releases/tag/v2.0.0"
}, {
"type" : "PACKAGE",
"url" : "https://github.com/phpecc/phpecc"
} ],
"database_specific" : {
"cwe_ids" : [ "CWE-203", "CWE-354" ],
"severity" : "CRITICAL",
"github_reviewed" : true,
"github_reviewed_at" : "2024-04-25T18:31:58Z",
"nvd_published_at" : null
}
}