{"answers":{"affected":"2 open source packages ship an affected version, including mdanter/ecc.","exploited":"There is no known exploitation of GHSA-346h-749j-r28w in the wild and no public exploit code.","fix":"No fix has been published for GHSA-346h-749j-r28w yet. Limit exposure of the affected software until one is available.","what":"GHSA-346h-749j-r28w is a vulnerability in mdanter/ecc, published on 25 Apr 2024. An attacker can exploit it over the internet without logging in, with no action from the victim."},"fix_prompt":"Check this codebase for GHSA-346h-749j-r28w and fix it if it is affected.\n\nWhat it is: GHSA-346h-749j-r28w is a vulnerability in mdanter/ecc, published on 25 Apr 2024. An attacker can exploit it over the internet without logging in, with no action from the victim.\nExploitation: There is no known exploitation of GHSA-346h-749j-r28w in the wild and no public exploit code.\n\nAffected packages and fixed versions:\n- mdanter/ecc (Packagist): affected all versions up to 1.0.0; no fix listed\n- mdanter/ecc (Packagist): affected all versions up to 1.0.0; no fix listed\n\nTask:\n1. Search the dependency manifests and lockfiles (for example package.json, package-lock.json, requirements.txt, poetry.lock, uv.lock, pom.xml, build.gradle, go.mod, Cargo.lock, Gemfile.lock) and any Dockerfiles for the affected packages, including transitive dependencies.\n2. If an affected version is in use, upgrade it to the fixed version for its release line with the project's package manager, so the lockfile is regenerated. Prefer the smallest upgrade that fixes it.\n3. If there is no fix, or the upgrade would break the build, do not guess: explain the risk and the safest workaround instead.\n4. Run the tests and summarise what changed and why.\n5. If nothing in the project is affected, say so and change nothing.\n\nReference: https://insights.sbomify.com/GHSA-346h-749j-r28w/ (Markdown: https://insights.sbomify.com/GHSA-346h-749j-r28w/index.md)","id":"GHSA-346h-749j-r28w","markdown":"https://insights.sbomify.com/GHSA-346h-749j-r28w/index.md","name":"GHSA-346h-749j-r28w","record":{"aliases":[],"analysis":{"component_type":"library","fix_type":"upgrade","impacts":["data_read","privilege_escalation"],"network_reachable":"yes","non_default_config":false,"product_category":"PHP ECC library","requires_auth":"none","summary":"PHPECC library leaks private keys via timing side-channels in ECDSA and ECDH operations, allowing attackers to recover secrets.","user_interaction":"not_required","vuln_class":"weak_cryptography"},"analysis_generated_by":"qwen3.8-flash-next","assigner":null,"cpe":[],"cvss":{"score":null,"severity":null,"source":null,"vector":null,"version":null},"cwes":[],"description":"### 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.","ecosystems":["Packagist"],"exploits":{"exploitdb":null,"first_seen":null,"github_poc":null,"max_poc_stars":null,"metasploit":null,"nuclei":null,"refs":[],"tier":null},"has_fix":false,"headline":"PHPECC vulnerable to multiple cryptographic side-channel attacks","id":"GHSA-346h-749j-r28w","indexable":true,"kev":null,"kind":"advisory","links":{"ecosystem":"Packagist","product":null,"products":[],"type":"weak_cryptography","year":"2024"},"n_packages":2,"n_references":null,"packages":[{"ecosystem":"Packagist","fixed":[],"introduced":["0"],"last_affected":["1.0.0"],"package":"mdanter/ecc","purl":null,"source":"GHSA-346h-749j-r28w"},{"ecosystem":"Packagist","fixed":[],"introduced":["0"],"last_affected":["1.0.0"],"package":"mdanter/ecc","purl":"pkg:composer/mdanter/ecc","source":"GHSA-346h-749j-r28w"}],"products":null,"published":"2024-04-25","related":[],"sources":[{"class":"attribution","licence":"CC BY 4.0","name":"GitHub Advisory Database","prefix":"GHSA"}],"ssvc":{"automatable":null,"exploitation":null,"technical_impact":null},"state":null,"updated":null,"vendors":null},"summary":"PHPECC library leaks private keys via timing side-channels in ECDSA and ECDH operations, allowing attackers to recover secrets.","url":"https://insights.sbomify.com/GHSA-346h-749j-r28w/"}