Vulnerabilities in pkg:golang/github.com/supranational/blst

PACKAGE
Advisory Summary

GHSA-x279-68rr-jp4p is a MODERATE blst vulnerable to incorrect results vulnerability (General Security Weakness) affecting Github.com/supranational/blst libraries in the Go ecosystem. The issue involves blst vulnerable to incorrect results for some inputs in blst_fp_eucl_inverse function. Remediation is available by upgrading affected packages to version 0.3.3.

2 Known Advisory Record(s)
Package Vulnerability Intelligence

pkg:golang/github.com/supranational/blst

2 Known Advisory Record(s)

Vulnerability advisories affecting package pkg:golang/github.com/supranational/blst. Select an advisory below to view technical details or fixes.

Advisory ID CVE / NVD Severity Summary
GHSA-x279-68rr-jp4p - MODERATE Blst vulnerable to incorrect results for some inputs in blst_fp_eucl_inverse function
GHSA-8c37-7qx3-4c4p - MODERATE Blst has logical error in SigValidate in Go bindings

GHSA-x279-68rr-jp4p at a Glance

CVE Identifier N/A
GHSA Identifier GHSA-x279-68rr-jp4p
Severity MODERATE
CVSS v3.1 Base Score N/A
CWE Classification General Security Weakness
Affected Product Github.com/supranational/blst
Package Ecosystem Go
Published Date
Last Updated

How to Fix GHSA-x279-68rr-jp4p

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

github.com/supranational/blst fixed: 0.3.3
Upgrade github.com/supranational/blst to 0.3.3
Verify Direct and Transitive Dependencies

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

inspect dependencies for github.com/supranational/blst

How to Check if You Are Affected

To determine whether your application is affected by GHSA-x279-68rr-jp4p, inspect your project dependencies for Github.com/supranational/blst:

inspect dependencies for github.com/supranational/blst

Analyze the terminal output to locate any version of Github.com/supranational/blst in your dependency tree. If any resolved version matches the vulnerable ranges listed in the table below (for example, versions earlier than 0.3.3), 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 General Security Weakness. In Github.com/supranational/blst, 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 Blst versions v0.3.0 to v0.3.2 can produce the incorrect outputs for some inputs to the blst_fp_eucl_inverse function. This could theoretically result in the creation of an invalid signature from correct inputs. However, fuzzing of higher level functions such as sign and verify were unable to produce incorrect results and there has been no reported occurrences of this issue being encountered in production use. ### Description During the course of differential fuzzing of the blst library by @guidovranken it was discovered that blst would produce the incorrect result for some input values in the inverse function. This was the result of the introduction of a new inversion formula in version v0.3.0. This source of these incorrect outputs was due to two issues: 1. The amount of inner loop iterations was not sufficient for the algorithm to converge. 2. It was erroneously assumed that the absolute value of the intermediate result would be capped at 767-bits. As a result, some output values were truncated by one bit or the most significant bit was misinterpreted as the sign. ### Patches This issue has been resolved in the v0.3.3 release and users are recommended to upgrade immediately. ### References The software used to uncover this issue can be found [here](https://github.com/guidovranken/cryptofuzz). ### Credits A special thanks to Guido Vranken (@guidovranken) for his discovery and disclosure of this vulnerability. ### For more information If you have any questions or comments about this advisory please email us at [hello@supranational.net](mailto:hello@supranational.net)

GHSA-x279-68rr-jp4p Affected Github.com/supranational/blst Versions

1 component(s)
Fixed Versions:
0.3.3
Product / Package Ecosystem Affected Versions Fixed Version
github.com/supranational/blst
Go
≥ 0.3.0
< 0.3.3
0.3.3

References

Frequently Asked Questions

What is GHSA-x279-68rr-jp4p?
GHSA-x279-68rr-jp4p is a security vulnerability in Github.com/supranational/blst involving Blst vulnerable to incorrect results for some inputs in blst_fp_eucl_inverse function under General Security Weakness.
Which Github.com/supranational/blst versions are affected?
Affected versions include releases prior to 0.3.3 across affected packages: github.com/supranational/blst.
What version fixes GHSA-x279-68rr-jp4p?
Upgrading to 0.3.3 (or the latest patched release for your respective branch) resolves the vulnerability.
Is github.com/supranational/blst affected?
Yes, github.com/supranational/blst is affected in releases prior to 0.3.3. Upgrade your dependency to 0.3.3 or later.
What CWE is associated with GHSA-x279-68rr-jp4p?
GHSA-x279-68rr-jp4p is classified under General Security Weakness.
How can I check Go dependencies for GHSA-x279-68rr-jp4p?
Run the dependency tree command: 'inspect dependencies for github.com/supranational/blst'. 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-x279-68rr-jp4p",
  "modified" : "2024-05-20T21:32:00Z",
  "published" : "2022-10-07T07:25:33Z",
  "aliases" : [ ],
  "summary" : "Blst vulnerable to incorrect results for some inputs in blst_fp_eucl_inverse function",
  "details" : "### Impact\nBlst versions v0.3.0 to v0.3.2 can produce the incorrect outputs for some inputs to the blst_fp_eucl_inverse function. This could theoretically result in the creation of an invalid signature from correct inputs. However, fuzzing of higher level functions such as sign and verify were unable to produce incorrect results and there has been no reported occurrences of this issue being encountered in production use.\n\n### Description\nDuring the course of differential fuzzing of the blst library by @guidovranken it was discovered that blst would produce the incorrect result for some input values in the inverse function. This was the result of the introduction of a new inversion formula in version v0.3.0. This source of these incorrect outputs was due to two issues:\n\n1. The amount of inner loop iterations was not sufficient for the algorithm to converge.\n2. It was erroneously assumed that the absolute value of the intermediate result would be capped at 767-bits. As a result, some output values were truncated by one bit or the most significant bit was misinterpreted as the sign.\n\n### Patches\nThis issue has been resolved in the v0.3.3 release and users are recommended to upgrade immediately.\n\n### References\nThe software used to uncover this issue can be found [here](https://github.com/guidovranken/cryptofuzz).\n\n### Credits\nA special thanks to Guido Vranken (@guidovranken) for his discovery and disclosure of this vulnerability.\n\n### For more information\nIf you have any questions or comments about this advisory please email us at [hello@supranational.net](mailto:hello@supranational.net)",
  "severity" : [ ],
  "affected" : [ {
    "package" : {
      "ecosystem" : "Go",
      "name" : "github.com/supranational/blst"
    },
    "ranges" : [ {
      "type" : "ECOSYSTEM",
      "events" : [ {
        "introduced" : "0.3.0"
      }, {
        "fixed" : "0.3.3"
      } ]
    } ]
  } ],
  "references" : [ {
    "type" : "WEB",
    "url" : "https://github.com/supranational/blst/security/advisories/GHSA-x279-68rr-jp4p"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/supranational/blst/commit/dd980e7f81397895705c49fcb4f52e485bb45e21"
  }, {
    "type" : "PACKAGE",
    "url" : "https://github.com/supranational/blst"
  }, {
    "type" : "WEB",
    "url" : "https://pkg.go.dev/vuln/GO-2022-1053"
  } ],
  "database_specific" : {
    "cwe_ids" : [ ],
    "severity" : "MODERATE",
    "github_reviewed" : true,
    "github_reviewed_at" : "2022-10-07T07:25:33Z",
    "nvd_published_at" : null
  }
}