Miggo Logo

CVE-2023-34458: mx-chain-go's relayed transactions always increment nonce

7.1

CVSS Score
3.1

Basic Information

EPSS Score
0.81308%
Published
7/13/2023
Updated
11/4/2023
KEV Status
No
Technology
TechnologyGo

Technical Details

CVSS Vector
CVSS:3.1/AV:N/AC:H/PR:L/UI:N/S:U/C:H/I:L/A:H
Package NameEcosystemVulnerable VersionsFirst Patched Version
github.com/multiversx/mx-chain-gogo< 1.4.171.4.17

Vulnerability Intelligence
Miggo AIMiggo AI

Miggo AIRoot Cause Analysis

The vulnerability stemmed from the nonce increment logic in relayed transaction handling. The key vulnerable function was removeValueAndConsumedFeeFromUser which contained userAcnt.IncreaseNonce(1) without error checks. The commit diff shows this was modified to use shouldIncreaseNonce which adds error type checks. The processUserTx function was also involved as it triggered this logic. Pre-patch versions lacked the RelayedNonceFixEnableEpoch flag checks and error analysis demonstrated in the fixed code.

Vulnerable functions

Only Mi**o us*rs **n s** t*is s**tion

WAF Protection Rules

WAF Rule

### Imp**t W**n *x**utin* * r*l*y** tr*ns**tion, i* t** inn*r tr*ns**tion **il**, it woul* **v* in*r**s** t** inn*r tr*ns**tion's s*n**r ***ount non**. T*is *oul* **v* *ontri*ut** to * limit** *oS *tt**k on * t*r**t** ***ount. T** *ix is * *r**kin* *

Reasoning

T** vuln*r**ility st*mm** *rom t** non** in*r*m*nt lo*i* in r*l*y** tr*ns**tion **n*lin*. T** k*y vuln*r**l* *un*tion w*s `r*mov*V*lu**n**onsum******romUs*r` w*i** *ont*in** `us*r**nt.In*r**s*Non**(*)` wit*out *rror ****ks. T** *ommit *i** s*ows t*is