GHSA-hvh4-5qr6-3v7r: Pypqc Observable Timing Discrepancy Vulnerability

HIGH
CVSS 8.2
CWE-385 CWE-733
Published
Advisory Summary

GHSA-hvh4-5qr6-3v7r is a HIGH (CVSS 8.2) observable timing discrepancy vulnerability (CWE-385: Covert Timing Channel) affecting Pypqc libraries in the PyPI ecosystem. The issue involves observable timing discrepancy in pypqc. Remediation is available in the latest vendor maintenance releases.

GHSA-hvh4-5qr6-3v7r at a Glance

CVE Identifier N/A
GHSA Identifier GHSA-hvh4-5qr6-3v7r
Severity HIGH
CVSS v3.1 Base Score 8.2
CWE Classification CWE-385: Covert Timing Channel
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/E:P/RL:U/RC:C).

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-hvh4-5qr6-3v7r

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: Latest secure release
pip install pypqc>=Latest secure release
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-hvh4-5qr6-3v7r, 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 the patched release), 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 CWE-385: Covert Timing Channel, where covert timing channels convey information by modulating some aspect of system behavior over time, so that the program receiving the information can observe system behavior and infer protected information. 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` on Mac OS \(or when compiled with clang\) 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:N/AC:L/PR:N/UI:N/S:U/C:H/I:L/A:N/E:P/RL:U/RC:C ### Patches No patch is currently available / pending upstream [PQClean#556](https://github.com/PQClean/PQClean/issues/556). ### Workarounds No workarounds have been reported. The 0.0.7 -> 0.0.7.1 upgrade, when available, should be a drop-in replacement<!--; it has no known breaking changes-->. ### References https://pqshield.com/pqshield-plugs-timing-leaks-in-kyber-ml-kem-to-improve-pqc-implementation-maturity/ https://github.com/antoonpurnal/clangover https://www.github.com/PQClean/PQClean/issues/556 https://www.github.com/pq-crystals/kyber/commit/9b8d30698a3e7449aeb34e62339d4176f11e3c6c

GHSA-hvh4-5qr6-3v7r Affected Pypqc Versions

1 component(s)
Product / Package Ecosystem Affected Versions Fixed Version
pypqc
PyPI
≥ 0.0.4
≤ 0.0.6.2

References

Frequently Asked Questions

What is GHSA-hvh4-5qr6-3v7r?
GHSA-hvh4-5qr6-3v7r is a security vulnerability in Pypqc involving Observable Timing Discrepancy in pypqc under CWE-385: Covert Timing Channel.
Which Pypqc versions are affected?
Affected versions include releases prior to current release patches across affected packages: pypqc.
What version fixes GHSA-hvh4-5qr6-3v7r?
Upgrading to current release patches (or the latest patched release for your respective branch) resolves the vulnerability.
Is pypqc affected?
Yes, pypqc is affected in releases prior to Latest secure release. Upgrade your dependency to Latest secure release or later.
What is the CVSS score of GHSA-hvh4-5qr6-3v7r?
GHSA-hvh4-5qr6-3v7r 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/E:P/RL:U/RC:C.
What CWE is associated with GHSA-hvh4-5qr6-3v7r?
GHSA-hvh4-5qr6-3v7r is classified under CWE-385: Covert Timing Channel (Covert timing channels convey information by modulating some aspect of system behavior over time, so that the program receiving the information can observe system behavior and infer protected information.).
How can I check PyPI dependencies for GHSA-hvh4-5qr6-3v7r?
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-hvh4-5qr6-3v7r",
  "modified" : "2024-06-05T18:36:15Z",
  "published" : "2024-06-05T16:56:35Z",
  "aliases" : [ ],
  "summary" : "Observable Timing Discrepancy in pypqc",
  "details" : "### Impact\n`kyber512`, `kyber768`, and `kyber1024` on Mac OS \\(or when compiled with clang\\) 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:N/AC:L/PR:N/UI:N/S:U/C:H/I:L/A:N/E:P/RL:U/RC:C  \n\n### Patches\nNo patch is currently available / pending upstream [PQClean#556](https://github.com/PQClean/PQClean/issues/556).\n\n### Workarounds\nNo workarounds have been reported. The 0.0.7 -> 0.0.7.1 upgrade, when available, should be a drop-in replacement<!--; it has no known breaking changes-->.\n\n### References\n\nhttps://pqshield.com/pqshield-plugs-timing-leaks-in-kyber-ml-kem-to-improve-pqc-implementation-maturity/\n\nhttps://github.com/antoonpurnal/clangover\n\nhttps://www.github.com/PQClean/PQClean/issues/556\n\nhttps://www.github.com/pq-crystals/kyber/commit/9b8d30698a3e7449aeb34e62339d4176f11e3c6c",
  "severity" : [ {
    "type" : "CVSS_V3",
    "score" : "CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:L/A:N/E:P/RL:U/RC:C"
  } ],
  "affected" : [ {
    "package" : {
      "ecosystem" : "PyPI",
      "name" : "pypqc"
    },
    "ranges" : [ {
      "type" : "ECOSYSTEM",
      "events" : [ {
        "introduced" : "0.0.4"
      }, {
        "last_affected" : "0.0.6.2"
      } ]
    } ]
  } ],
  "references" : [ {
    "type" : "WEB",
    "url" : "https://github.com/JamesTheAwesomeDude/pypqc/security/advisories/GHSA-hvh4-5qr6-3v7r"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/PQClean/PQClean/issues/556"
  }, {
    "type" : "PACKAGE",
    "url" : "https://github.com/JamesTheAwesomeDude/pypqc"
  } ],
  "database_specific" : {
    "cwe_ids" : [ "CWE-385", "CWE-733" ],
    "severity" : "HIGH",
    "github_reviewed" : true,
    "github_reviewed_at" : "2024-06-05T16:56:35Z",
    "nvd_published_at" : null
  }
}