Search criteria
1 vulnerability by tc39
CVE-2024-43357 (GCVE-0-2024-43357)
Vulnerability from cvelistv5 – Published: 2024-08-15 18:36 – Updated: 2024-08-15 19:10
VLAI?
Title
JavaScript specification issue may lead to type confusion and pointer dereference in implementations
Summary
ECMA-262 is the language specification for the scripting language ECMAScript. A problem in the ECMAScript (JavaScript) specification of async generators, introduced by a May 2021 spec refactor, may lead to mis-implementation in a way that could present as a security vulnerability, such as type confusion and pointer dereference.
The internal async generator machinery calls regular promise resolver functions on IteratorResult (`{ done, value }`) objects that it creates, assuming that the IteratorResult objects will not be then-ables. Unfortunately, these IteratorResult objects inherit from `Object.prototype`, so these IteratorResult objects can be made then-able, triggering arbitrary behaviour, including re-entering the async generator machinery in a way that violates some internal invariants.
The ECMAScript specification is a living standard and the issue has been addressed at the time of this advisory's public disclosure. JavaScript engine implementors should refer to the latest specification and update their implementations to comply with the `AsyncGenerator` section.
## References
- https://github.com/tc39/ecma262/commit/1e24a286d0a327d08e1154926b3ee79820232727
- https://bugzilla.mozilla.org/show_bug.cgi?id=1901411
- https://github.com/boa-dev/boa/security/advisories/GHSA-f67q-wr6w-23jq
- https://bugs.webkit.org/show_bug.cgi?id=275407
- https://issues.chromium.org/issues/346692561
- https://www.cve.org/CVERecord?id=CVE-2024-7652
Severity ?
8.6 (High)
CWE
Assigner
References
| URL | Tags | |||||||||||||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
|
||||||||||||||||||||||||||||||||
{
"containers": {
"adp": [
{
"affected": [
{
"cpes": [
"cpe:2.3:a:ecma_international:ecma262:*:*:*:*:*:*:*:*"
],
"defaultStatus": "unknown",
"product": "ecma262",
"vendor": "ecma_international",
"versions": [
{
"lessThan": "2025",
"status": "affected",
"version": "2022",
"versionType": "custom"
}
]
}
],
"metrics": [
{
"other": {
"content": {
"id": "CVE-2024-43357",
"options": [
{
"Exploitation": "none"
},
{
"Automatable": "yes"
},
{
"Technical Impact": "partial"
}
],
"role": "CISA Coordinator",
"timestamp": "2024-08-15T18:59:18.834850Z",
"version": "2.0.3"
},
"type": "ssvc"
}
}
],
"providerMetadata": {
"dateUpdated": "2024-08-15T19:10:00.235Z",
"orgId": "134c704f-9b21-4f2e-91b3-4a467353bcc0",
"shortName": "CISA-ADP"
},
"title": "CISA ADP Vulnrichment"
}
],
"cna": {
"affected": [
{
"product": "ecma262",
"vendor": "tc39",
"versions": [
{
"status": "affected",
"version": "\u003e= 2022, \u003c 2025"
}
]
}
],
"descriptions": [
{
"lang": "en",
"value": "ECMA-262 is the language specification for the scripting language ECMAScript. A problem in the ECMAScript (JavaScript) specification of async generators, introduced by a May 2021 spec refactor, may lead to mis-implementation in a way that could present as a security vulnerability, such as type confusion and pointer dereference.\n\nThe internal async generator machinery calls regular promise resolver functions on IteratorResult (`{ done, value }`) objects that it creates, assuming that the IteratorResult objects will not be then-ables. Unfortunately, these IteratorResult objects inherit from `Object.prototype`, so these IteratorResult objects can be made then-able, triggering arbitrary behaviour, including re-entering the async generator machinery in a way that violates some internal invariants.\n\nThe ECMAScript specification is a living standard and the issue has been addressed at the time of this advisory\u0027s public disclosure. JavaScript engine implementors should refer to the latest specification and update their implementations to comply with the `AsyncGenerator` section.\n\n## References\n\n- https://github.com/tc39/ecma262/commit/1e24a286d0a327d08e1154926b3ee79820232727\n- https://bugzilla.mozilla.org/show_bug.cgi?id=1901411\n- https://github.com/boa-dev/boa/security/advisories/GHSA-f67q-wr6w-23jq\n- https://bugs.webkit.org/show_bug.cgi?id=275407\n- https://issues.chromium.org/issues/346692561\n- https://www.cve.org/CVERecord?id=CVE-2024-7652"
}
],
"metrics": [
{
"cvssV3_1": {
"attackComplexity": "LOW",
"attackVector": "NETWORK",
"availabilityImpact": "HIGH",
"baseScore": 8.6,
"baseSeverity": "HIGH",
"confidentialityImpact": "LOW",
"integrityImpact": "LOW",
"privilegesRequired": "NONE",
"scope": "UNCHANGED",
"userInteraction": "NONE",
"vectorString": "CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:L/I:L/A:H",
"version": "3.1"
}
}
],
"problemTypes": [
{
"descriptions": [
{
"cweId": "CWE-248",
"description": "CWE-248: Uncaught Exception",
"lang": "en",
"type": "CWE"
}
]
},
{
"descriptions": [
{
"cweId": "CWE-476",
"description": "CWE-476: NULL Pointer Dereference",
"lang": "en",
"type": "CWE"
}
]
},
{
"descriptions": [
{
"cweId": "CWE-843",
"description": "CWE-843: Access of Resource Using Incompatible Type (\u0027Type Confusion\u0027)",
"lang": "en",
"type": "CWE"
}
]
}
],
"providerMetadata": {
"dateUpdated": "2024-08-15T18:36:49.012Z",
"orgId": "a0819718-46f1-4df5-94e2-005712e83aaa",
"shortName": "GitHub_M"
},
"references": [
{
"name": "https://github.com/tc39/ecma262/security/advisories/GHSA-g38c-wh3c-5h9r",
"tags": [
"x_refsource_CONFIRM"
],
"url": "https://github.com/tc39/ecma262/security/advisories/GHSA-g38c-wh3c-5h9r"
},
{
"name": "https://github.com/boa-dev/boa/security/advisories/GHSA-f67q-wr6w-23jq",
"tags": [
"x_refsource_MISC"
],
"url": "https://github.com/boa-dev/boa/security/advisories/GHSA-f67q-wr6w-23jq"
},
{
"name": "https://github.com/tc39/ecma262/pull/2413",
"tags": [
"x_refsource_MISC"
],
"url": "https://github.com/tc39/ecma262/pull/2413"
},
{
"name": "https://github.com/tc39/ecma262/commit/1e24a286d0a327d08e1154926b3ee79820232727",
"tags": [
"x_refsource_MISC"
],
"url": "https://github.com/tc39/ecma262/commit/1e24a286d0a327d08e1154926b3ee79820232727"
},
{
"name": "https://github.com/tc39/ecma262/commit/4cb5a6980e20be76c648f113c4cc762342172df3",
"tags": [
"x_refsource_MISC"
],
"url": "https://github.com/tc39/ecma262/commit/4cb5a6980e20be76c648f113c4cc762342172df3"
},
{
"name": "https://bugs.webkit.org/show_bug.cgi?id=275407",
"tags": [
"x_refsource_MISC"
],
"url": "https://bugs.webkit.org/show_bug.cgi?id=275407"
},
{
"name": "https://bugzilla.mozilla.org/show_bug.cgi?id=1901411",
"tags": [
"x_refsource_MISC"
],
"url": "https://bugzilla.mozilla.org/show_bug.cgi?id=1901411"
},
{
"name": "https://issues.chromium.org/issues/346692561",
"tags": [
"x_refsource_MISC"
],
"url": "https://issues.chromium.org/issues/346692561"
},
{
"name": "https://tc39.es/ecma262/#sec-asyncgenerator-objects",
"tags": [
"x_refsource_MISC"
],
"url": "https://tc39.es/ecma262/#sec-asyncgenerator-objects"
},
{
"name": "https://www.cve.org/CVERecord?id=CVE-2024-7652",
"tags": [
"x_refsource_MISC"
],
"url": "https://www.cve.org/CVERecord?id=CVE-2024-7652"
}
],
"source": {
"advisory": "GHSA-g38c-wh3c-5h9r",
"discovery": "UNKNOWN"
},
"title": "JavaScript specification issue may lead to type confusion and pointer dereference in implementations"
}
},
"cveMetadata": {
"assignerOrgId": "a0819718-46f1-4df5-94e2-005712e83aaa",
"assignerShortName": "GitHub_M",
"cveId": "CVE-2024-43357",
"datePublished": "2024-08-15T18:36:49.012Z",
"dateReserved": "2024-08-09T14:23:55.511Z",
"dateUpdated": "2024-08-15T19:10:00.235Z",
"state": "PUBLISHED"
},
"dataType": "CVE_RECORD",
"dataVersion": "5.1"
}