# CVE-2022-31020: Indy's NODE_UPGRADE transaction vulnerable to remote code execution

Source: https://junglewise.ai/threats/cve-2022-31020-indy-s-node-upgrade-transaction-vulnerable-to-remote-code  
Publisher: Junglewise Threat Intelligence, https://junglewise.ai/threats  
Published: 2022-09-06  
License: CC BY 4.0 with a link back

CVE-2022-31020 · Severity: low · CVSS 3.1 · Published 2022-09-06

Indy Node is the server portion of a distributed ledger purpose-built for decentralized identity. In versions 1.12.4 and prior, the `pool-upgrade` request handler in Indy-Node allows an improperly authenticated attacker to remotely execute code on nodes within the network. The `pool-upgrade` request handler in Indy-Node 1.12.5 has been updated to properly authenticate pool-upgrade transactions before any processing is performed by the request handler. The transactions are further sanitized to prevent remote code execution. As a workaround, endorsers should not create DIDs for untrusted users. A vulnerable ledger should configure `auth_rules` to prevent new DIDs from being written to the ledger until the network can be upgraded.

Technologies: [indy-node (PyPI)](https://junglewise.ai/threats/technologies/indy-node). Vendors: [PyPI](https://junglewise.ai/threats/vendors/pypi).

## Quick answers

**Is CVE-2022-31020 exploited in the wild?** No. Junglewise Threat Intelligence has no report of CVE-2022-31020 being exploited in the wild.

**How severe is CVE-2022-31020?** Low severity, with a CVSS score of 3.1, published 6 September 2022.

**Which products and versions are affected?** indy-node (PyPI) ECOSYSTEM:introduced=0,fixed=1.12.5rc1, GIT:introduced=0,fixed=fe507474f77084faef4539101e2bbb4d508a97f5|ECOSYSTEM:introduced=0,fixed=1.12.5rc1.

**Is there a fix for CVE-2022-31020?** Yes. indy-node (PyPI): upgrade to 1.12.5rc1 or later. Junglewise finds every place you run it, drafts the upgrade and applies it once you approve.

**Am I affected by CVE-2022-31020?** Check whether you run indy-node (PyPI) at an affected version. Junglewise does that check for you around the clock: connect your code, cloud and domains, and it matches new vulnerabilities like this one against what you actually run and tells you when one reaches you.

## How to fix

- indy-node (PyPI): upgrade to 1.12.5rc1 or later

  ```sh
  pip install "indy-node>=1.12.5rc1"
  ```


## Affected products

- indy-node (PyPI) ECOSYSTEM:introduced=0,fixed=1.12.5rc1, GIT:introduced=0,fixed=fe507474f77084faef4539101e2bbb4d508a97f5|ECOSYSTEM:introduced=0,fixed=1.12.5rc1

## Identifiers

- CVE-2022-31020
- GHSA-r6v9-p59m-gj2p
- PYSEC-2022-265

## Related threats

- [Hyperledger indy-node vulnerable to denial of service](https://junglewise.ai/threats/cve-2022-31006-hyperledger-indy-node-vulnerable-to-denial-of-service)
- [Hyperledger Indy's update process of a DID does not check who signs the request](https://junglewise.ai/threats/cve-2020-11093-hyperledger-indy-s-update-process-of-a-did-does-not-check-who)
- [Hyperledger Indy Node denial of service in TAA transaction handling](https://junglewise.ai/threats/cve-2020-11090-hyperledger-indy-node-denial-of-service-in-taa-transaction)
