GHSA-rc4p-p3j9-6577: Pypqc Pypqc Private Key Retrieval Vulnerability Vulnerability

HIGH
CVSS 8.2
Published
Advisory Summary

GHSA-rc4p-p3j9-6577 is a HIGH (CVSS 8.2) pypqc private key retrieval vulnerability vulnerability (General Security Weakness) affecting Pypqc libraries in the PyPI ecosystem. The issue involves pypqc private key retrieval vulnerability. Remediation is available by upgrading affected packages to version 0.0.6.1.

GHSA-rc4p-p3j9-6577 at a Glance

CVE Identifier N/A
GHSA Identifier GHSA-rc4p-p3j9-6577
Severity HIGH
CVSS v3.1 Base Score 8.2
CWE Classification General Security Weakness
Affected Product Pypqc
Package Ecosystem PyPI
Published Date
Last Updated

Security Impact

CVSS: 8.2

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:L/A:N).

Attack Vector Network (AV:N)
Attack Complexity Low (AC:L)
Privileges Required None (PR:N)
User Interaction None (UI:N)
Scope Unchanged (S:U)
Confidentiality High (C:H)
Integrity Low (I:L)
Availability None (A:N)

How to Fix GHSA-rc4p-p3j9-6577

To remediate this vulnerability, upgrade all affected Pypqc dependencies to a patched release. Both direct and transitive dependencies should be checked, as frameworks or security libraries may pull in vulnerable versions transitively.

pypqc fixed: 0.0.6.1
pip install pypqc>=0.0.6.1
Verify Direct and Transitive Dependencies

Run the following command in your project directory to verify that all resolved dependencies use the patched release:

pip show pypqc

How to Check if You Are Affected

To determine whether your Python environment is affected by GHSA-rc4p-p3j9-6577, inspect your installed packages using pip:

pip show pypqc

Analyze the terminal output to locate any version of Pypqc in your dependency tree. If any resolved version matches the vulnerable ranges listed in the table below (for example, versions earlier than 0.0.6.1), your application is affected.

Note: The pip show pypqc command checks currently installed packages in your active Python environment.

Technical Details

Vulnerability Mechanism & Technical Analysis

This vulnerability is classified under General Security Weakness. In Pypqc, 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

### Impact `kyber512`, `kyber768`, and `kyber1024` only: An attacker able to submit many decapsulation requests against a single private key, and to gain timing information about the decapsulation, could recover the private key. Proof-of-concept exploit exists for a local attacker. CVSS:3.1/AV:A/AC:L/PR:N/UI:N/S:U/C:H/I:L/A:N/E:P/RL:O/RC:C ### Patches Version 0.0.6.1 and newer of PyPQC is patched. ### Workarounds No workarounds have been reported. The 0.0.6 -> 0.0.6.1 upgrade should be a drop-in replacement; it has no known breaking changes. ### References #### Timeline 1. Cryspen researchers privately reported KyberSlash to the reference implementation maintainers. 2. Peter Schwabe partially patched KyberSlash \(only "KyberSlash 1"\) in the reference implementation on December 1st, 2023, but did not document or advertise this as a security patch. https://www.github.com/pq-crystals/kyber/commit/dda29cc63af721981ee2c831cf00822e69be3220 3. Daniel J. Bernstein publicly reported KyberSlash as a security issue on December 15th, 2023. https://groups.google.com/a/list.nist.gov/g/pqc-forum/c/hWqFJCucuj4/m/-Z-jm_k9AAAJ 4. Daniel J. Bernstein created a webpage for authoritative reference about KyberSlash on December 19th, 2023. https://kyberslash.cr.yp.to/ 5. Thom Wiggers acknowledged KyberSlash as a security issue on December 19th, 2023. https://www.github.com/PQClean/PQClean/issues/533 6. Prasanna Ravi and Matthias Kannwischer privately reported further details about KyberSlash \("KyberSlash 2"\) to the reference implementation maintainers. 7. Peter Schwabe completely patched KyberSlash in the reference implementation on December 29th, 2023. https://www.github.com/pq-crystals/kyber/commit/11d00ff1f20cfca1f72d819e5a45165c1e0a2816 8. Prasanna Ravi and Matthias Kannwischer publicly reported their findings \("KyberSlash 2"\) on December 30th, 2023. https://groups.google.com/a/list.nist.gov/g/pqc-forum/c/ldX0ThYJuBo/m/ovODsdY7AwAJ 9. Daniel J. Bernstein published a proof-of-concept exploit \(only validated for a local attacker\) for KyberSlash on December 30th, 2023. https://groups.google.com/a/list.nist.gov/g/pqc-forum/c/ldX0ThYJuBo/m/uIOqRF5BAwAJ 10. Thom Wiggers completely patched KyberSlash in PQClean on January 25th, 2024. https://www.github.com/PQClean/PQClean/commit/3b43bc6fe46fe47be38f87af5019a7f1462ae6dd 11. James E. A. completely patched KyberSlash in pypqc and released a security update on January 26th, 2024. https://www.github.com/JamesTheAwesomeDude/pypqc/commit/b33fec8cd36e865f8db6215c64b2d01f429a1ed6

GHSA-rc4p-p3j9-6577 Affected Pypqc Versions

1 component(s)
Fixed Versions:
0.0.6.1
Product / Package Ecosystem Affected Versions Fixed Version
pypqc
PyPI
≥ 0.0.4
< 0.0.6.1
0.0.6.1

References

Frequently Asked Questions

What is GHSA-rc4p-p3j9-6577?
GHSA-rc4p-p3j9-6577 is a security vulnerability in Pypqc involving pypqc private key retrieval vulnerability under General Security Weakness.
Which Pypqc versions are affected?
Affected versions include releases prior to 0.0.6.1 across affected packages: pypqc.
What version fixes GHSA-rc4p-p3j9-6577?
Upgrading to 0.0.6.1 (or the latest patched release for your respective branch) resolves the vulnerability.
Is pypqc affected?
Yes, pypqc is affected in releases prior to 0.0.6.1. Upgrade your dependency to 0.0.6.1 or later.
What is the CVSS score of GHSA-rc4p-p3j9-6577?
GHSA-rc4p-p3j9-6577 has a CVSS v3.1 base score of 8.2 (HIGH) with vector string CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:L/A:N.
What CWE is associated with GHSA-rc4p-p3j9-6577?
GHSA-rc4p-p3j9-6577 is classified under General Security Weakness.
How can I check PyPI dependencies for GHSA-rc4p-p3j9-6577?
Run the dependency tree command: 'pip show pypqc'. This command lists direct and transitive dependencies in your build configuration so you can verify if a vulnerable version is resolved.
Machine-readable OSV JSON OSV v1.5 Schema
Normalized schema output
{
  "schema_version" : "1.4.0",
  "id" : "GHSA-rc4p-p3j9-6577",
  "modified" : "2024-03-19T18:27:04Z",
  "published" : "2024-02-22T21:41:47Z",
  "aliases" : [ ],
  "summary" : "pypqc private key retrieval vulnerability",
  "details" : "### Impact\n`kyber512`, `kyber768`, and `kyber1024` only: An attacker able to submit many decapsulation requests against a single private key, and to gain timing information about the decapsulation, could recover the private key. Proof-of-concept exploit exists for a local attacker.\n\nCVSS:3.1/AV:A/AC:L/PR:N/UI:N/S:U/C:H/I:L/A:N/E:P/RL:O/RC:C  \n\n### Patches\nVersion 0.0.6.1 and newer of PyPQC is patched.\n\n### Workarounds\nNo workarounds have been reported. The 0.0.6 -> 0.0.6.1 upgrade should be a drop-in replacement; it has no known breaking changes.\n\n### References\n#### Timeline\n1. Cryspen researchers privately reported KyberSlash to the reference implementation maintainers.\n\n2. Peter Schwabe partially patched KyberSlash \\(only \"KyberSlash 1\"\\) in the reference implementation on December 1st, 2023, but did not document or advertise this as a security patch.  \n   https://www.github.com/pq-crystals/kyber/commit/dda29cc63af721981ee2c831cf00822e69be3220\n\n3. Daniel J. Bernstein publicly reported KyberSlash as a security issue on December 15th, 2023.  \n   https://groups.google.com/a/list.nist.gov/g/pqc-forum/c/hWqFJCucuj4/m/-Z-jm_k9AAAJ\n\n4. Daniel J. Bernstein created a webpage for authoritative reference about KyberSlash on December 19th, 2023.  \n   https://kyberslash.cr.yp.to/\n\n5. Thom Wiggers acknowledged KyberSlash as a security issue on December 19th, 2023.  \n   https://www.github.com/PQClean/PQClean/issues/533\n\n6. Prasanna Ravi and Matthias Kannwischer privately reported further details about KyberSlash \\(\"KyberSlash 2\"\\) to the reference implementation maintainers.\n\n7. Peter Schwabe completely patched KyberSlash in the reference implementation on December 29th, 2023.\n   https://www.github.com/pq-crystals/kyber/commit/11d00ff1f20cfca1f72d819e5a45165c1e0a2816\n\n8. Prasanna Ravi and Matthias Kannwischer publicly reported their findings \\(\"KyberSlash 2\"\\) on December 30th, 2023.  \n   https://groups.google.com/a/list.nist.gov/g/pqc-forum/c/ldX0ThYJuBo/m/ovODsdY7AwAJ\n\n9. Daniel J. Bernstein published a proof-of-concept exploit \\(only validated for a local attacker\\) for KyberSlash on December 30th, 2023.  \n   https://groups.google.com/a/list.nist.gov/g/pqc-forum/c/ldX0ThYJuBo/m/uIOqRF5BAwAJ\n\n10. Thom Wiggers completely patched KyberSlash in PQClean on January 25th, 2024.  \n   https://www.github.com/PQClean/PQClean/commit/3b43bc6fe46fe47be38f87af5019a7f1462ae6dd\n\n11. James E. A. completely patched KyberSlash in pypqc and released a security update on January 26th, 2024.  \n   https://www.github.com/JamesTheAwesomeDude/pypqc/commit/b33fec8cd36e865f8db6215c64b2d01f429a1ed6",
  "severity" : [ {
    "type" : "CVSS_V3",
    "score" : "CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:L/A:N"
  } ],
  "affected" : [ {
    "package" : {
      "ecosystem" : "PyPI",
      "name" : "pypqc"
    },
    "ranges" : [ {
      "type" : "ECOSYSTEM",
      "events" : [ {
        "introduced" : "0.0.4"
      }, {
        "fixed" : "0.0.6.1"
      } ]
    } ]
  } ],
  "references" : [ {
    "type" : "WEB",
    "url" : "https://github.com/JamesTheAwesomeDude/pypqc/security/advisories/GHSA-rc4p-p3j9-6577"
  }, {
    "type" : "PACKAGE",
    "url" : "https://github.com/JamesTheAwesomeDude/pypqc"
  }, {
    "type" : "WEB",
    "url" : "https://groups.google.com/a/list.nist.gov/g/pqc-forum/c/hWqFJCucuj4/m/-Z-jm_k9AAAJ"
  }, {
    "type" : "WEB",
    "url" : "https://groups.google.com/a/list.nist.gov/g/pqc-forum/c/ldX0ThYJuBo/m/uIOqRF5BAwAJ"
  }, {
    "type" : "WEB",
    "url" : "https://kyberslash.cr.yp.to"
  }, {
    "type" : "WEB",
    "url" : "https://www.github.com/JamesTheAwesomeDude/pypqc/commit/b33fec8cd36e865f8db6215c64b2d01f429a1ed6"
  }, {
    "type" : "WEB",
    "url" : "https://www.github.com/PQClean/PQClean/issues/533"
  }, {
    "type" : "WEB",
    "url" : "https://www.github.com/PQClean/PQClean/pull/534#event-11595728485"
  }, {
    "type" : "WEB",
    "url" : "https://www.github.com/pq-crystals/kyber/commit/11d00ff1f20cfca1f72d819e5a45165c1e0a2816"
  }, {
    "type" : "WEB",
    "url" : "https://www.github.com/pq-crystals/kyber/commit/dda29cc63af721981ee2c831cf00822e69be3220"
  } ],
  "database_specific" : {
    "cwe_ids" : [ ],
    "severity" : "HIGH",
    "github_reviewed" : true,
    "github_reviewed_at" : "2024-02-22T21:41:47Z",
    "nvd_published_at" : null
  }
}