Vulnerabilities in pkg:pypi/srp

PACKAGE
Advisory Identifier: GHSA-xmc3-9m9j-w9x4
Advisory Summary

CVE-2021-4286 is a HIGH (CVSS 7.5) cocagne pysrp vulnerable to side vulnerability (CWE-203: Observable Discrepancy) affecting Srp libraries in the PyPI ecosystem. The issue involves cocagne pysrp vulnerable to side channel leaks. Remediation is available by upgrading affected packages to version 1.0.17.

1 Known Advisory Record(s)
Package Vulnerability Intelligence

pkg:pypi/srp

1 Known Advisory Record(s)

Vulnerability advisories affecting package pkg:pypi/srp. Select an advisory below to view technical details or fixes.

Advisory ID CVE / NVD Severity Summary
GHSA-xmc3-9m9j-w9x4 CVE-2021-4286 HIGH cocagne pysrp vulnerable to side channel leaks

CVE-2021-4286 at a Glance

CVE Identifier CVE-2021-4286
GHSA Identifier GHSA-xmc3-9m9j-w9x4
Severity HIGH
CVSS v3.1 Base Score 7.5
CWE Classification CWE-203: Observable Discrepancy
Affected Product Srp
Package Ecosystem PyPI
Published Date
Last Updated

Security Impact

CVSS: 7.5

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:N/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 None (I:N)
Availability None (A:N)

How to Fix CVE-2021-4286

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

srp fixed: 1.0.17
pip install srp>=1.0.17
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 srp

How to Check if You Are Affected

To determine whether your Python environment is affected by CVE-2021-4286, inspect your installed packages using pip:

pip show srp

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

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

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 Srp, 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

A vulnerability, which was classified as problematic, has been found in cocagne pysrp up to 1.0.16. This issue affects the function calculate_x of the file `srp/_ctsrp.py`. The manipulation leads to information exposure through discrepancy. Upgrading to version 1.0.17 is able to address this issue. The name of the patch is dba52642f5e95d3da7af1780561213ee6053195f. It is recommended to upgrade the affected component. The associated identifier of this vulnerability is VDB-216875.

CVE-2021-4286 Affected Srp Versions

1 component(s)
Fixed Versions:
1.0.17
Product / Package Ecosystem Affected Versions Fixed Version
srp
PyPI
< 1.0.17
1.0.17

References

Frequently Asked Questions

What is CVE-2021-4286?
CVE-2021-4286 is a security vulnerability in Srp involving cocagne pysrp vulnerable to side channel leaks under CWE-203: Observable Discrepancy.
Which Srp versions are affected?
Affected versions include releases prior to 1.0.17 across affected packages: srp.
What version fixes CVE-2021-4286?
Upgrading to 1.0.17 (or the latest patched release for your respective branch) resolves the vulnerability.
Is srp affected?
Yes, srp is affected in releases prior to 1.0.17. Upgrade your dependency to 1.0.17 or later.
What is the CVSS score of CVE-2021-4286?
CVE-2021-4286 has a CVSS v3.1 base score of 7.5 (HIGH) with vector string CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:N/A:N.
What CWE is associated with CVE-2021-4286?
CVE-2021-4286 is classified under CWE-203: Observable Discrepancy (The product behaves differently or sends different responses under different circumstances in a way that is observable to an unauthorized actor.).
How can I check PyPI dependencies for CVE-2021-4286?
Run the dependency tree command: 'pip show srp'. 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-xmc3-9m9j-w9x4",
  "modified" : "2024-10-28T14:37:58Z",
  "published" : "2022-12-27T12:30:20Z",
  "aliases" : [ "CVE-2021-4286" ],
  "summary" : "cocagne pysrp vulnerable to side channel leaks",
  "details" : "A vulnerability, which was classified as problematic, has been found in cocagne pysrp up to 1.0.16. This issue affects the function calculate_x of the file `srp/_ctsrp.py`. The manipulation leads to information exposure through discrepancy. Upgrading to version 1.0.17 is able to address this issue. The name of the patch is dba52642f5e95d3da7af1780561213ee6053195f. It is recommended to upgrade the affected component. The associated identifier of this vulnerability is VDB-216875.",
  "severity" : [ {
    "type" : "CVSS_V3",
    "score" : "CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:N/A:N"
  }, {
    "type" : "CVSS_V4",
    "score" : "CVSS:4.0/AV:N/AC:L/AT:N/PR:N/UI:N/VC:H/VI:N/VA:N/SC:N/SI:N/SA:N"
  } ],
  "affected" : [ {
    "package" : {
      "ecosystem" : "PyPI",
      "name" : "srp"
    },
    "ranges" : [ {
      "type" : "ECOSYSTEM",
      "events" : [ {
        "introduced" : "0"
      }, {
        "fixed" : "1.0.17"
      } ]
    } ]
  } ],
  "references" : [ {
    "type" : "ADVISORY",
    "url" : "https://nvd.nist.gov/vuln/detail/CVE-2021-4286"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/cocagne/pysrp/pull/43"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/cocagne/pysrp/commit/dba52642f5e95d3da7af1780561213ee6053195f"
  }, {
    "type" : "PACKAGE",
    "url" : "https://github.com/cocagne/pysrp"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/cocagne/pysrp/releases/tag/1.0.17"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/pypa/advisory-database/tree/main/vulns/srp/PYSEC-2022-43014.yaml"
  }, {
    "type" : "WEB",
    "url" : "https://vuldb.com/?ctiid.216875"
  }, {
    "type" : "WEB",
    "url" : "https://vuldb.com/?id.216875"
  } ],
  "database_specific" : {
    "cwe_ids" : [ "CWE-203" ],
    "severity" : "HIGH",
    "github_reviewed" : true,
    "github_reviewed_at" : "2024-05-01T16:25:56Z",
    "nvd_published_at" : "2022-12-27T11:15:00Z"
  }
}