CVE-2023-42449

Malicious head initialiser can extract PTs from control of Hydra scripts, leading to locked participant commits or spoofed commits

8.1 high EPSS 1.17%

Published 4 Oct 2023 Updated 20 Sep 2024 CNA: GitHub_M

Check your servers for CVE-2023-42449

The Vulnpocalypse collector sends the package list of each Linux server and of its container images once a day. Vulnpocalypse shows every server where CVE-2023-42449 affects hydra, with the command that installs the fix. The free plan covers one server and one domain and does not need a credit card.

Check my servers

Description

Hydra is the two-layer scalability solution for Cardano. Prior to version 0.13.0, it is possible for a malicious head initializer to extract one or more PTs for the head they are initializing due to incorrect data validation logic in the head token minting policy which then results in an flawed check for burning the head ST in the `initial` validator. This is possible because it is not checked in `HeadTokens.hs` that the datums of the outputs at the `initial` validator are equal to the real head ID, and it is also not checked in the `off-chain code`.

During the `Initial` state of the protocol, if the malicious initializer removes a PT from the Hydra scripts it becomes impossible for any other participant to reclaim any funds they have attempted to commit into the head, as to do so the Abort transaction must burn all the PTs for the head, but they cannot burn the PT which the attacker controls and so cannot satisfy this requirement. That means the initializer can lock the other participants committed funds forever or until they choose to return the PT (ransom).

The malicious initializer can also use the PT to spoof that they have committed a particular TxO when progressing the head into the `Open` state. For example, they could say they committed a TxO residing at their address containing 100 ADA, but in fact this 100 ADA was not moved into the head, and thus in order for an other participant to perform the fanout they will be forced to pay the attacker the 100 ADA out of their own funds, as the fanout transaction must pay all the committed TxOs (even though the attacker did not really commit that TxO). They can do this by placing the PT in a UTxO with a well-formed `Commit` datum with whatever contents they like, then use this UTxO in the `collectCom` transaction. There may be other possible ways to abuse having control of a PT.

Version 0.13.0 fixes this issue.

Severity (CVSS)

8.1 high CVSS 3.1 from GitHub_M (CNA)
CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:N/I:H/A:H
Attack vector
network: an attacker can reach the vulnerable part over the network, often from the internet
Attack complexity
low: an attack works without special conditions
Privileges required
low: the attacker needs an ordinary user account
User interaction
none: nobody has to click or open anything
Scope
unchanged: the damage stays inside the vulnerable component
Impact
confidentiality none, integrity high, availability high: what an attacker can read (confidentiality), change (integrity) or stop (availability)

Exploitation

EPSS 1.17%: the probability of exploitation activity in the next 30 days, from the EPSS model of FIRST. The score is higher than 67.1% of all scored CVEs. Scores of 30 Nov 2026.

The assessment of CISA (SSVC, 20 Sep 2024):

Exploitation
poc: a proof of concept is public
Automatable
no: each attack takes manual steps
Technical impact
partial: limited control or limited data

Weakness

  • CWE-20 Improper Input Validation

Affected products

As the CNA lists them.

ProductVersions
hydra
affected < 0.13.0

Is my server affected?

Find the installed version of hydra and compare it with the fixed version of your distribution. Distributions often fix a CVE in a package version of their own, so the version number of the upstream project can mislead.

Debian, Ubuntu

dpkg -l | grep -i hydra
# packages whose changelog names the CVE (fixed in the installed version)
zgrep -l CVE-2023-42449 /usr/share/doc/*/changelog.Debian.gz
# Ubuntu
pro fix CVE-2023-42449

RHEL, Rocky, Alma, Fedora

rpm -q hydra
# lists the advisory while the fix is not installed
dnf updateinfo list --cve CVE-2023-42449

Alpine

apk list --installed | grep -i hydra

With Trivy, on the host and for a container image. When a package is affected, it prints the installed and the fixed version:

trivy rootfs --scanners vuln / | grep CVE-2023-42449
trivy image --scanners vuln IMAGE | grep CVE-2023-42449

Vulnpocalypse makes this comparison every day for the package lists of your servers and container images, including language packages (npm, PyPI, Go, Maven and others), and sends the command that installs the fix. Start free with one server and one domain or read how to install the collector.

References

Advisories

Other references

Source: the record CVE-2023-42449 of the CVE List (CVE Program), CVE Terms of Use; the CISA KEV catalog and the CISA ADP container; EPSS of FIRST; the CWE catalog of MITRE, CWE Terms of Use. The text of the record is shown as published. Data sources and licences.