{ "id": "CVE-2023-42449", "sourceIdentifier": "security-advisories@github.com", "published": "2023-10-04T20:15:10.107", "lastModified": "2024-11-21T08:22:33.250", "vulnStatus": "Modified", "cveTags": [], "descriptions": [ { "lang": "en", "value": "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`.\n\nDuring 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).\n\nThe 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.\n\nVersion 0.13.0 fixes this issue." }, { "lang": "es", "value": "Hydra es la soluci\u00f3n de escalabilidad de dos capas para Cardano. Antes de la versi\u00f3n 0.13.0, es posible que un inicializador de \"head\" malicioso extraiga uno o m\u00e1s PT para el \"head\" que est\u00e1 inicializando debido a una l\u00f3gica de validaci\u00f3n de datos incorrecta en la pol\u00edtica de acu\u00f1aci\u00f3n de tokens del \"head\", lo que luego resulta en una verificaci\u00f3n defectuosa para quemar el \"head\" ST en el validador \"initial\". Esto es posible porque no se verifica en \"HeadTokens.hs\" que los datos de las salidas en el validador \"initial\" sean iguales al ID del \"head\" real, y tampoco se verifica en el \"off-chain code\". Durante el estado \"Initial\" del protocolo, si el inicializador malicioso elimina un PT de los scripts de Hydra, resulta imposible para cualquier otro participante obtener los fondos que han intentado hacer \"commit\" en el \"head\", ya que para hacerlo, la transacci\u00f3n Abort debe quemar todos los PT para el \"head\", pero no pueden quemar el PT que controla el atacante y, por lo tanto, no pueden satisfacer este requisito. Eso significa que el inicializador puede bloquear los fondos hechos \"committed\" de los otros participantes para siempre o hasta que decidan devolver el PT (rescate). El inicializador malicioso tambi\u00e9n puede usar el PT para simular un \"committed\" en un TxO particular cuando el \"head\" avanza al estado \"Open\". Por ejemplo, podr\u00edan decir que hicieron \"committed\" a un TxO residiendo en su direcci\u00f3n que conten\u00eda 100 ADA, pero en realidad estos 100 ADA no se movieron al \"head\" y, por lo tanto, para que otro participante realice el fanout se ver\u00e1n obligados a pagar al atacante los 100 ADA de sus propios fondos, ya que la transacci\u00f3n fanout debe pagar todos los TxO que hicieron \"committed\" (aunque el atacante realiz\u00f3 el \"commit\" TxO). Pueden hacer esto colocando el PT en un UTxO con un dato \"Commit\" bien formado con el contenido que deseen y luego usar este UTxO en la transacci\u00f3n \"collectCom\". Puede haber otras formas posibles de abusar del control de un PT. La versi\u00f3n 0.13.0 soluciona este problema." } ], "metrics": { "cvssMetricV31": [ { "source": "security-advisories@github.com", "type": "Secondary", "cvssData": { "version": "3.1", "vectorString": "CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:N/I:H/A:H", "baseScore": 8.1, "baseSeverity": "HIGH", "attackVector": "NETWORK", "attackComplexity": "LOW", "privilegesRequired": "LOW", "userInteraction": "NONE", "scope": "UNCHANGED", "confidentialityImpact": "NONE", "integrityImpact": "HIGH", "availabilityImpact": "HIGH" }, "exploitabilityScore": 2.8, "impactScore": 5.2 }, { "source": "nvd@nist.gov", "type": "Primary", "cvssData": { "version": "3.1", "vectorString": "CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:N/I:H/A:H", "baseScore": 8.1, "baseSeverity": "HIGH", "attackVector": "NETWORK", "attackComplexity": "LOW", "privilegesRequired": "LOW", "userInteraction": "NONE", "scope": "UNCHANGED", "confidentialityImpact": "NONE", "integrityImpact": "HIGH", "availabilityImpact": "HIGH" }, "exploitabilityScore": 2.8, "impactScore": 5.2 } ] }, "weaknesses": [ { "source": "security-advisories@github.com", "type": "Secondary", "description": [ { "lang": "en", "value": "CWE-20" } ] }, { "source": "nvd@nist.gov", "type": "Primary", "description": [ { "lang": "en", "value": "NVD-CWE-noinfo" } ] } ], "configurations": [ { "nodes": [ { "operator": "OR", "negate": false, "cpeMatch": [ { "vulnerable": true, "criteria": "cpe:2.3:a:iohk:hydra:*:*:*:*:*:*:*:*", "versionEndExcluding": "0.13.0", "matchCriteriaId": "556BF21B-9F61-4C1D-BD51-A2EC64EA1CE7" } ] } ] } ], "references": [ { "url": "https://github.com/input-output-hk/hydra/blob/1e13b60a7b21c5ccd6c36e3cf220547f5d443cef/hydra-node/src/Hydra/Chain/Direct/Tx.hs#L645-L761", "source": "security-advisories@github.com", "tags": [ "Product" ] }, { "url": "https://github.com/input-output-hk/hydra/blob/1e13b60a7b21c5ccd6c36e3cf220547f5d443cef/hydra-plutus/src/Hydra/Contract/Initial.hs#L84-L91", "source": "security-advisories@github.com", "tags": [ "Product" ] }, { "url": "https://github.com/input-output-hk/hydra/blob/master/CHANGELOG.md#0130---2023-10-03", "source": "security-advisories@github.com", "tags": [ "Release Notes" ] }, { "url": "https://github.com/input-output-hk/hydra/blob/master/hydra-plutus/src/Hydra/Contract/HeadTokens.hs#L76-L136", "source": "security-advisories@github.com", "tags": [ "Product" ] }, { "url": "https://github.com/input-output-hk/hydra/security/advisories/GHSA-9m8q-7wxv-v65p", "source": "security-advisories@github.com", "tags": [ "Exploit", "Vendor Advisory" ] }, { "url": "https://github.com/input-output-hk/hydra/blob/1e13b60a7b21c5ccd6c36e3cf220547f5d443cef/hydra-node/src/Hydra/Chain/Direct/Tx.hs#L645-L761", "source": "af854a3a-2127-422b-91ae-364da2661108", "tags": [ "Product" ] }, { "url": "https://github.com/input-output-hk/hydra/blob/1e13b60a7b21c5ccd6c36e3cf220547f5d443cef/hydra-plutus/src/Hydra/Contract/Initial.hs#L84-L91", "source": "af854a3a-2127-422b-91ae-364da2661108", "tags": [ "Product" ] }, { "url": "https://github.com/input-output-hk/hydra/blob/master/CHANGELOG.md#0130---2023-10-03", "source": "af854a3a-2127-422b-91ae-364da2661108", "tags": [ "Release Notes" ] }, { "url": "https://github.com/input-output-hk/hydra/blob/master/hydra-plutus/src/Hydra/Contract/HeadTokens.hs#L76-L136", "source": "af854a3a-2127-422b-91ae-364da2661108", "tags": [ "Product" ] }, { "url": "https://github.com/input-output-hk/hydra/security/advisories/GHSA-9m8q-7wxv-v65p", "source": "af854a3a-2127-422b-91ae-364da2661108", "tags": [ "Exploit", "Vendor Advisory" ] } ] }