# CVE-2023-26557: IO FinNet tss-lib vulnerable to timing attack from non-constant time scalar arithmetic

> Attackers can recover private key lambda values via timing side-channels in tss-lib due to non-constant-time Go big.Int operations.

- **Severity:** High 7.5 (`CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:N/A:N`)
- **Exploited in the wild:** Not known
- **Login needed:** Not needed
- **Attackable:** Over the internet
- **Victim action needed:** Not needed
- **Fix available:** Yes
- **Published:** 21 Apr 2023
- **Updated:** 5 Feb 2025
- **Also known as:** GHSA-mjqv-xhgm-gx8c, GO-2023-1733

## What is CVE-2023-26557?

CVE-2023-26557 is a high-severity vulnerability in n/a, published on 21 Apr 2023. An attacker can exploit it over the internet without logging in, with no action from the victim.

### Official description

io.finnet tss-lib before 2.0.0 can leak the lambda value of a private key via a timing side-channel attack because it relies on Go big.Int, which is not constant time for Cmp, modular exponentiation, or modular inverse. An example leak is in crypto/paillier/paillier.go. (bnb-chain/tss-lib and thorchain/tss are also affected.)

Weakness: CWE-203 (Observable Discrepancy)

## Which versions are affected by CVE-2023-26557?

6 open source packages ship an affected version, including github.com/binance-chain/tss-lib and github.com/bnb-chain/tss-lib. It affects 1 product.


| Package | Ecosystem | Affected | Fixed in |
| --- | --- | --- | --- |
| `github.com/binance-chain/tss-lib` | Go | All versions | None |
| `github.com/binance-chain/tss-lib` | Go | All versions | 1.3.6-0.20230324145555-bb6fb30bd3eb |
| `github.com/binance-chain/tss-lib` | Go | All versions | 1.3.6-0.20230324145555-bb6fb30bd3eb |
| `github.com/bnb-chain/tss-lib` | Go | All versions | 1.3.6-0.20230324145555-bb6fb30bd3eb |
| `github.com/bnb-chain/tss-lib` | Go | All versions | 1.3.6-0.20230324145555-bb6fb30bd3eb |
| `github.com/bnb-chain/tss-lib` | Go | All versions | 1.3.6-0.20230324145555-bb6fb30bd3eb |

Products: Iofinnet Tss-Lib.

## How do I fix CVE-2023-26557?

Upgrade github.com/binance-chain/tss-lib to 1.3.6-0.20230324145555-bb6fb30bd3eb or later.

## Is CVE-2023-26557 being exploited?

There is no known exploitation of CVE-2023-26557 in the wild and no public exploit code.

## Other vulnerabilities in n/a

- [CVE-2023-26556](https://insights.sbomify.com/CVE-2023-26556/): IO FinNet tss-lib vulnerable to timing attack from non-constant time scalar multiplication (critical 9.1)
- [CVE-2022-47930](https://insights.sbomify.com/CVE-2022-47930/): IO FinNet tss-lib vulnerable to replay attacks involving proofs (medium 6.8)
- [CVE-2022-47931](https://insights.sbomify.com/CVE-2022-47931/): Collision of hash values in github.com/bnb-chain/tss-lib (medium 6.5)

## Fix prompt for AI coding agents

```text
Check this codebase for CVE-2023-26557 and fix it if it is affected.

What it is: CVE-2023-26557 is a high-severity vulnerability in n/a, published on 21 Apr 2023. An attacker can exploit it over the internet without logging in, with no action from the victim.
Exploitation: There is no known exploitation of CVE-2023-26557 in the wild and no public exploit code.

Affected packages and fixed versions:
- github.com/binance-chain/tss-lib (Go): affected all versions; no fix listed
- github.com/binance-chain/tss-lib (Go): affected all versions; fixed in 1.3.6-0.20230324145555-bb6fb30bd3eb
- github.com/binance-chain/tss-lib (Go): affected all versions; fixed in 1.3.6-0.20230324145555-bb6fb30bd3eb
- github.com/bnb-chain/tss-lib (Go): affected all versions; fixed in 1.3.6-0.20230324145555-bb6fb30bd3eb
- github.com/bnb-chain/tss-lib (Go): affected all versions; fixed in 1.3.6-0.20230324145555-bb6fb30bd3eb
- github.com/bnb-chain/tss-lib (Go): affected all versions; fixed in 1.3.6-0.20230324145555-bb6fb30bd3eb

Task:
1. 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.
2. 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.
3. If there is no fix, or the upgrade would break the build, do not guess: explain the risk and the safest workaround instead.
4. Run the tests and summarise what changed and why.
5. If nothing in the project is affected, say so and change nothing.

Reference: https://insights.sbomify.com/CVE-2023-26557/ (Markdown: https://insights.sbomify.com/CVE-2023-26557/index.md)
```

## Sources

- CVE record: https://www.cve.org/CVERecord?id=CVE-2023-26557
- NVD: https://nvd.nist.gov/vuln/detail/CVE-2023-26557
- OSV: https://osv.dev/vulnerability/CVE-2023-26557

---
From sbomify Insights: https://insights.sbomify.com/CVE-2023-26557/
Summaries are generated and may contain mistakes; the official description above is the record.
