{
    "dataType": "CVE_RECORD",
    "dataVersion": "5.1",
    "cveMetadata": {
        "cveId": "CVE-2023-34449",
        "assignerOrgId": "a0819718-46f1-4df5-94e2-005712e83aaa",
        "state": "PUBLISHED",
        "assignerShortName": "GitHub_M",
        "dateReserved": "2023-06-06T16:16:53.558Z",
        "datePublished": "2023-06-14T20:10:54.842Z",
        "dateUpdated": "2024-08-02T16:10:07.115Z"
    },
    "containers": {
        "cna": {
            "title": "ink! vulnerable to incorrect decoding of storage value when using `DelegateCall`",
            "problemTypes": [
                {
                    "descriptions": [
                        {
                            "cweId": "CWE-754",
                            "lang": "en",
                            "description": "CWE-754: Improper Check for Unusual or Exceptional Conditions",
                            "type": "CWE"
                        }
                    ]
                },
                {
                    "descriptions": [
                        {
                            "cweId": "CWE-253",
                            "lang": "en",
                            "description": "CWE-253: Incorrect Check of Function Return Value",
                            "type": "CWE"
                        }
                    ]
                }
            ],
            "metrics": [
                {
                    "cvssV3_1": {
                        "attackComplexity": "LOW",
                        "attackVector": "NETWORK",
                        "availabilityImpact": "NONE",
                        "baseScore": 5.3,
                        "baseSeverity": "MEDIUM",
                        "confidentialityImpact": "NONE",
                        "integrityImpact": "LOW",
                        "privilegesRequired": "NONE",
                        "scope": "UNCHANGED",
                        "userInteraction": "NONE",
                        "vectorString": "CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:L/A:N",
                        "version": "3.1"
                    }
                }
            ],
            "references": [
                {
                    "name": "https://github.com/paritytech/ink/security/advisories/GHSA-853p-5678-hv8f",
                    "tags": [
                        "x_refsource_CONFIRM"
                    ],
                    "url": "https://github.com/paritytech/ink/security/advisories/GHSA-853p-5678-hv8f"
                },
                {
                    "name": "https://github.com/paritytech/ink/pull/1450",
                    "tags": [
                        "x_refsource_MISC"
                    ],
                    "url": "https://github.com/paritytech/ink/pull/1450"
                },
                {
                    "name": "https://github.com/paritytech/ink/commit/f1407ee9f87e5f64d467a22d26ee88f61db7f3db",
                    "tags": [
                        "x_refsource_MISC"
                    ],
                    "url": "https://github.com/paritytech/ink/commit/f1407ee9f87e5f64d467a22d26ee88f61db7f3db"
                },
                {
                    "name": "https://docs.rs/ink_env/4.2.0/ink_env/call/struct.CallBuilder.html#method.delegate",
                    "tags": [
                        "x_refsource_MISC"
                    ],
                    "url": "https://docs.rs/ink_env/4.2.0/ink_env/call/struct.CallBuilder.html#method.delegate"
                },
                {
                    "name": "https://docs.rs/ink_env/4.2.0/ink_env/fn.invoke_contract_delegate.html",
                    "tags": [
                        "x_refsource_MISC"
                    ],
                    "url": "https://docs.rs/ink_env/4.2.0/ink_env/fn.invoke_contract_delegate.html"
                }
            ],
            "affected": [
                {
                    "vendor": "paritytech",
                    "product": "ink",
                    "versions": [
                        {
                            "version": ">= 4.0.0, < 4.2.1",
                            "status": "affected"
                        }
                    ]
                }
            ],
            "providerMetadata": {
                "orgId": "a0819718-46f1-4df5-94e2-005712e83aaa",
                "shortName": "GitHub_M",
                "dateUpdated": "2023-06-14T20:11:15.570Z"
            },
            "descriptions": [
                {
                    "lang": "en",
                    "value": "ink! is an embedded domain specific language to write smart contracts in Rust for blockchains built on the Substrate framework. Starting in version 4.0.0 and prior to version 4.2.1, the return value when using delegate call mechanics, either through `CallBuilder::delegate` or `ink_env::invoke_contract_delegate`, is decoded incorrectly. This bug was related to the mechanics around decoding a call's return buffer, which was changed as part of pull request 1450. Since this feature was only released in ink! 4.0.0, no previous versions are affected. Users who have an ink! 4.x series contract should upgrade to 4.2.1 to receive a patch."
                }
            ],
            "source": {
                "advisory": "GHSA-853p-5678-hv8f",
                "discovery": "UNKNOWN"
            }
        },
        "adp": [
            {
                "providerMetadata": {
                    "orgId": "af854a3a-2127-422b-91ae-364da2661108",
                    "shortName": "CVE",
                    "dateUpdated": "2024-08-02T16:10:07.115Z"
                },
                "title": "CVE Program Container",
                "references": [
                    {
                        "name": "https://github.com/paritytech/ink/security/advisories/GHSA-853p-5678-hv8f",
                        "tags": [
                            "x_refsource_CONFIRM",
                            "x_transferred"
                        ],
                        "url": "https://github.com/paritytech/ink/security/advisories/GHSA-853p-5678-hv8f"
                    },
                    {
                        "name": "https://github.com/paritytech/ink/pull/1450",
                        "tags": [
                            "x_refsource_MISC",
                            "x_transferred"
                        ],
                        "url": "https://github.com/paritytech/ink/pull/1450"
                    },
                    {
                        "name": "https://github.com/paritytech/ink/commit/f1407ee9f87e5f64d467a22d26ee88f61db7f3db",
                        "tags": [
                            "x_refsource_MISC",
                            "x_transferred"
                        ],
                        "url": "https://github.com/paritytech/ink/commit/f1407ee9f87e5f64d467a22d26ee88f61db7f3db"
                    },
                    {
                        "name": "https://docs.rs/ink_env/4.2.0/ink_env/call/struct.CallBuilder.html#method.delegate",
                        "tags": [
                            "x_refsource_MISC",
                            "x_transferred"
                        ],
                        "url": "https://docs.rs/ink_env/4.2.0/ink_env/call/struct.CallBuilder.html#method.delegate"
                    },
                    {
                        "name": "https://docs.rs/ink_env/4.2.0/ink_env/fn.invoke_contract_delegate.html",
                        "tags": [
                            "x_refsource_MISC",
                            "x_transferred"
                        ],
                        "url": "https://docs.rs/ink_env/4.2.0/ink_env/fn.invoke_contract_delegate.html"
                    }
                ]
            }
        ]
    }
}