CVE-2018-8290
Description
A memory corruption vulnerability in Chakra scripting engine allows remote code execution in Microsoft Edge via a malicious website.
AI Insight
LLM-synthesized narrative grounded in this CVE's description and references.
A memory corruption vulnerability in Chakra scripting engine allows remote code execution in Microsoft Edge via a malicious website.
Vulnerability
A remote code execution vulnerability exists in the Chakra scripting engine as used in Microsoft Edge and ChakraCore, due to improper handling of objects in memory during array profiling. This leads to out-of-bounds read/write conditions. Affected versions include Microsoft Edge on Windows 10 (all versions) and ChakraCore prior to the commit that fixed the issue [1][2][3].
Exploitation
To exploit this vulnerability, an attacker must convince a user to visit a specially crafted website or open a malicious file that triggers the memory corruption. No authentication is required, and the attack can be performed remotely via a web browser [2][4].
Impact
Successful exploitation allows an attacker to execute arbitrary code in the context of the current user. If the user has administrative privileges, the attacker can gain full control of the affected system, potentially installing programs, viewing or modifying data, or creating new accounts [1][4].
Mitigation
Microsoft released a security update on July 10, 2018, as part of its monthly Patch Tuesday, which addresses this vulnerability. Users should apply the update via Windows Update. For ChakraCore, the fix is available in the referenced commit [3][4].
- NVD - CVE-2018-8290
- Microsoft Edge Scripting Engine CVE-2018-8290 Remote Memory Corruption Vulnerability
- [CVE-2018-8290] OOB profile read/write - Google, Inc · chakra-core/ChakraCore@8bd6826
- Microsoft Edge Multiple Object Memory Handling Errors Let Remote Users Execute Arbitrary Code and Bypass Security Restrictions
AI Insight generated on May 22, 2026. Synthesized from this CVE's description and the cited reference URLs; citations are validated against the source bundle.
Affected packages
Versions sourced from the GitHub Security Advisory.
| Package | Affected versions | Patched versions |
|---|---|---|
Microsoft.ChakraCoreNuGet | < 1.10.1 | 1.10.1 |
Affected products
3- Range: ChakraCore
Patches
18bd6826aea01[CVE-2018-8290] OOB profile read/write - Google, Inc
3 files changed · +46 −32
lib/Runtime/Language/InterpreterHandler.inl+2 −2 modified@@ -375,8 +375,8 @@ EXDEF3_WMS(CUSTOM, LdLocalElemUndef, OP_LdLocalElemen DEF3 (CUSTOM_L_R0, NewScIntArray, OP_NewScIntArray, Auxiliary) DEF3 (CUSTOM_L_R0, NewScFltArray, OP_NewScFltArray, Auxiliary) DEF3_WMS(CUSTOM_L_R0, ProfiledNewScArray, PROFILEDOP(OP_ProfiledNewScArray, OP_ProfiledNewScArray_NoProfile), ProfiledReg1Unsigned1) - DEF3 (CUSTOM_L_R0, ProfiledNewScIntArray, PROFILEDOP(OP_ProfiledNewScIntArray, OP_NewScIntArray), ProfiledAuxiliary) - DEF3 (CUSTOM_L_R0, ProfiledNewScFltArray, PROFILEDOP(OP_ProfiledNewScFltArray, OP_NewScFltArray), ProfiledAuxiliary) + DEF3 (CUSTOM_L_R0, ProfiledNewScIntArray, PROFILEDOP(ProfiledNewScIntArray<true>, ProfiledNewScIntArray<false>), ProfiledAuxiliary) + DEF3 (CUSTOM_L_R0, ProfiledNewScFltArray, PROFILEDOP(ProfiledNewScFltArray<true>, ProfiledNewScFltArray<false>), ProfiledAuxiliary) DEF2_WMS(RegextoA1, NewRegEx, JavascriptRegExp::OP_NewRegEx) EXDEF3_WMS(CUSTOM, InitClass, OP_InitClass, Class) DEF2_WMS(BRBReturnP1toA1, BrOnEmpty, JavascriptOperators::OP_BrOnEmpty)
lib/Runtime/Language/InterpreterStackFrame.cpp+30 −20 modified@@ -5144,14 +5144,6 @@ namespace Js void InterpreterStackFrame::OP_NewScIntArray(const unaligned OpLayoutAuxiliary * playout) { -#if ENABLE_PROFILE_INFO - if (isAutoProfiling) - { - OP_ProfiledNewScIntArray(static_cast<const unaligned OpLayoutDynamicProfile<OpLayoutAuxiliary> *>(playout)); - return; - } -#endif - const Js::AuxArray<int32> *ints = Js::ByteCodeReader::ReadAuxArray<int32>(playout->Offset, this->GetFunctionBody()); JavascriptNativeIntArray *arr = scriptContext->GetLibrary()->CreateNativeIntArrayLiteral(ints->count); @@ -5168,8 +5160,15 @@ namespace Js } #if ENABLE_PROFILE_INFO - void InterpreterStackFrame::OP_ProfiledNewScIntArray(const unaligned OpLayoutDynamicProfile<OpLayoutAuxiliary> * playout) + template <bool Profiled> + void InterpreterStackFrame::ProfiledNewScIntArray(const unaligned OpLayoutDynamicProfile<OpLayoutAuxiliary> * playout) { + if (!Profiled && !isAutoProfiling) + { + OP_NewScIntArray(playout); + return; + } + const Js::AuxArray<int32> *ints = Js::ByteCodeReader::ReadAuxArray<int32>(playout->Offset, this->GetFunctionBody()); Js::ProfileId profileId = playout->profileId; @@ -5229,18 +5228,16 @@ namespace Js SetReg(playout->R0, arr); } +#else + template <bool Profiled> + void InterpreterStackFrame::ProfiledNewScIntArray(const unaligned OpLayoutDynamicProfile<OpLayoutAuxiliary> * playout) + { + OP_NewScIntArray(playout); + } #endif void InterpreterStackFrame::OP_NewScFltArray(const unaligned OpLayoutAuxiliary * playout) { -#if ENABLE_PROFILE_INFO - if (isAutoProfiling) - { - OP_ProfiledNewScFltArray(static_cast<const unaligned OpLayoutDynamicProfile<OpLayoutAuxiliary> *>(playout)); - return; - } -#endif - const Js::AuxArray<double> *doubles = Js::ByteCodeReader::ReadAuxArray<double>(playout->Offset, this->GetFunctionBody()); JavascriptNativeFloatArray *arr = scriptContext->GetLibrary()->CreateNativeFloatArrayLiteral(doubles->count); @@ -5257,8 +5254,15 @@ namespace Js } #if ENABLE_PROFILE_INFO - void InterpreterStackFrame::OP_ProfiledNewScFltArray(const unaligned OpLayoutDynamicProfile<OpLayoutAuxiliary> * playout) + template <bool Profiled> + void InterpreterStackFrame::ProfiledNewScFltArray(const unaligned OpLayoutDynamicProfile<OpLayoutAuxiliary> * playout) { + if (!Profiled && !isAutoProfiling) + { + OP_NewScFltArray(playout); + return; + } + const Js::AuxArray<double> *doubles = Js::ByteCodeReader::ReadAuxArray<double>(playout->Offset, this->GetFunctionBody()); Js::ProfileId profileId = playout->profileId; @@ -5294,6 +5298,12 @@ namespace Js SetReg(playout->R0, arr); } +#else + template <bool Profiled> + void InterpreterStackFrame::ProfiledNewScFltArray(const unaligned OpLayoutDynamicProfile<OpLayoutAuxiliary> * playout) + { + OP_NewScFltArray(playout); + } #endif void InterpreterStackFrame::OP_SetArraySegmentVars(const unaligned OpLayoutAuxiliary * playout) @@ -6203,7 +6213,7 @@ namespace Js } template <class T, bool Profiled> - void InterpreterStackFrame::OP_NewScObjArray_Impl(const unaligned T* playout, const Js::AuxArray<uint32> *spreadIndices) + void InterpreterStackFrame::OP_ProfiledNewScObjArray_Impl(const unaligned T* playout, const Js::AuxArray<uint32> *spreadIndices) { // Always profile this operation when auto-profiling so that array type changes are tracked #if ENABLE_PROFILE_INFO @@ -6212,7 +6222,7 @@ namespace Js Assert(!Profiled); #endif { - OP_NewScObject_Impl<T, Profiled, false>(playout, Js::Constants::NoInlineCacheIndex, spreadIndices); + OP_NewScObjArray_Impl<T, Profiled>(playout, spreadIndices); return; }
lib/Runtime/Language/InterpreterStackFrame.h+14 −10 modified@@ -632,8 +632,10 @@ namespace Js template <class T> void OP_ProfiledNewScArray_NoProfile(const unaligned OpLayoutDynamicProfile<T> * playout) { ProfiledNewScArray<false, T>(playout); } void OP_NewScIntArray(const unaligned OpLayoutAuxiliary * playout); void OP_NewScFltArray(const unaligned OpLayoutAuxiliary * playout); - void OP_ProfiledNewScIntArray(const unaligned OpLayoutDynamicProfile<OpLayoutAuxiliary> * playout); - void OP_ProfiledNewScFltArray(const unaligned OpLayoutDynamicProfile<OpLayoutAuxiliary> * playout); + template <bool Profiled> void ProfiledNewScIntArray(const unaligned OpLayoutDynamicProfile<OpLayoutAuxiliary> * playout); + template <bool Profiled> void ProfiledNewScFltArray(const unaligned OpLayoutDynamicProfile<OpLayoutAuxiliary> * playout); + void OP_ProfiledNewScIntArray(const unaligned OpLayoutDynamicProfile<OpLayoutAuxiliary> * playout) { ProfiledNewScIntArray<true>(playout); } + void OP_ProfiledNewScFltArray(const unaligned OpLayoutDynamicProfile<OpLayoutAuxiliary> * playout) { ProfiledNewScFltArray<true>(playout); } template <class T> void OP_LdArrayHeadSegment(const unaligned T* playout); @@ -734,19 +736,21 @@ namespace Js template <bool Profile, bool JITLoopBody> void ProfiledLoopBodyStart(uint32 loopNumber, LayoutSize layoutSize, bool isFirstIteration); void OP_RecordImplicitCall(uint loopNumber); template <class T, bool Profiled, bool ICIndex> void OP_NewScObject_Impl(const unaligned T* playout, InlineCacheIndex inlineCacheIndex = Js::Constants::NoInlineCacheIndex, const Js::AuxArray<uint32> *spreadIndices = nullptr); - template <class T, bool Profiled> void OP_NewScObjArray_Impl(const unaligned T* playout, const Js::AuxArray<uint32> *spreadIndices = nullptr); + template <class T, bool Profiled, bool ICIndex> void OP_ProfiledNewScObject_Impl(const unaligned T* playout, InlineCacheIndex inlineCacheIndex = Js::Constants::NoInlineCacheIndex, const Js::AuxArray<uint32> *spreadIndices = nullptr) { OP_NewScObject_Impl<T, Profiled, ICIndex>(playout, inlineCacheIndex, spreadIndices); } + template <class T, bool Profiled> void OP_NewScObjArray_Impl(const unaligned T* playout, const Js::AuxArray<uint32> *spreadIndices = nullptr) { OP_NewScObject_Impl<T, Profiled, false>(playout, Js::Constants::NoInlineCacheIndex, spreadIndices); } + template <class T, bool Profiled> void OP_ProfiledNewScObjArray_Impl(const unaligned T* playout, const Js::AuxArray<uint32> *spreadIndices = nullptr); template <class T> void OP_NewScObject(const unaligned T* playout) { OP_NewScObject_Impl<T, false, false>(playout); } template <class T> void OP_NewScObjectNoCtorFull(const unaligned T* playout); template <class T> void OP_NewScObjectSpread(const unaligned T* playout) { OP_NewScObject_Impl<T, false, false>(playout, Js::Constants::NoInlineCacheIndex, m_reader.ReadAuxArray<uint32>(playout->SpreadAuxOffset, this->GetFunctionBody())); } template <class T> void OP_NewScObjArray(const unaligned T* playout) { OP_NewScObjArray_Impl<T, false>(playout); } template <class T> void OP_NewScObjArraySpread(const unaligned T* playout) { OP_NewScObjArray_Impl<T, false>(playout, m_reader.ReadAuxArray<uint32>(playout->SpreadAuxOffset, this->GetFunctionBody())); } - template <class T> void OP_ProfiledNewScObject(const unaligned OpLayoutDynamicProfile<T>* playout) { OP_NewScObject_Impl<T, true, false>(playout); } - template <class T> void OP_ProfiledNewScObjectSpread(const unaligned OpLayoutDynamicProfile<T>* playout) { OP_NewScObject_Impl<T, true, false>(playout, Js::Constants::NoInlineCacheIndex, m_reader.ReadAuxArray<uint32>(playout->SpreadAuxOffset, this->GetFunctionBody())); } - template <class T> void OP_ProfiledNewScObjectWithICIndex(const unaligned OpLayoutDynamicProfile<T>* playout) { OP_NewScObject_Impl<T, true, true>(playout, playout->inlineCacheIndex); } - template <class T> void OP_ProfiledNewScObjArray(const unaligned OpLayoutDynamicProfile2<T>* playout) { OP_NewScObjArray_Impl<T, true>(playout); } - template <class T> void OP_ProfiledNewScObjArray_NoProfile(const unaligned OpLayoutDynamicProfile2<T>* playout) { OP_NewScObjArray_Impl<T, false>(playout); } - template <class T> void OP_ProfiledNewScObjArraySpread(const unaligned OpLayoutDynamicProfile2<T>* playout) { OP_NewScObjArray_Impl<T, true>(playout, m_reader.ReadAuxArray<uint32>(playout->SpreadAuxOffset, this->GetFunctionBody())); } - template <class T> void OP_ProfiledNewScObjArraySpread_NoProfile(const unaligned OpLayoutDynamicProfile2<T>* playout) { OP_NewScObjArray_Impl<T, true>(playout, m_reader.ReadAuxArray<uint32>(playout->SpreadAuxOffset, this->GetFunctionBody())); } + template <class T> void OP_ProfiledNewScObject(const unaligned OpLayoutDynamicProfile<T>* playout) { OP_ProfiledNewScObject_Impl<T, true, false>(playout); } + template <class T> void OP_ProfiledNewScObjectSpread(const unaligned OpLayoutDynamicProfile<T>* playout) { OP_ProfiledNewScObject_Impl<T, true, false>(playout, Js::Constants::NoInlineCacheIndex, m_reader.ReadAuxArray<uint32>(playout->SpreadAuxOffset, this->GetFunctionBody())); } + template <class T> void OP_ProfiledNewScObjectWithICIndex(const unaligned OpLayoutDynamicProfile<T>* playout) { OP_ProfiledNewScObject_Impl<T, true, true>(playout, playout->inlineCacheIndex); } + template <class T> void OP_ProfiledNewScObjArray(const unaligned OpLayoutDynamicProfile2<T>* playout) { OP_ProfiledNewScObjArray_Impl<T, true>(playout); } + template <class T> void OP_ProfiledNewScObjArray_NoProfile(const unaligned OpLayoutDynamicProfile2<T>* playout) { OP_ProfiledNewScObjArray_Impl<T, false>(playout); } + template <class T> void OP_ProfiledNewScObjArraySpread(const unaligned OpLayoutDynamicProfile2<T>* playout) { OP_ProfiledNewScObjArray_Impl<T, true>(playout, m_reader.ReadAuxArray<uint32>(playout->SpreadAuxOffset, this->GetFunctionBody())); } + template <class T> void OP_ProfiledNewScObjArraySpread_NoProfile(const unaligned OpLayoutDynamicProfile2<T>* playout) { OP_ProfiledNewScObjArray_Impl<T, false>(playout, m_reader.ReadAuxArray<uint32>(playout->SpreadAuxOffset, this->GetFunctionBody())); } Var NewScObject_Helper(Var target, ArgSlot ArgCount, const Js::AuxArray<uint32> *spreadIndices = nullptr); Var ProfiledNewScObject_Helper(Var target, ArgSlot ArgCount, ProfileId profileId, InlineCacheIndex inlineCacheIndex, const Js::AuxArray<uint32> *spreadIndices = nullptr); template <class T, bool Profiled, bool ICIndex> Var OP_NewScObjectNoArg_Impl(const unaligned T *playout, InlineCacheIndex inlineCacheIndex = Js::Constants::NoInlineCacheIndex);
Vulnerability mechanics
Generated on May 9, 2026. Inputs: CWE entries + fix-commit diffs from this CVE's patches. Citations validated against bundle.
References
9- github.com/advisories/GHSA-vgxq-xv7f-jxjxghsaADVISORY
- nvd.nist.gov/vuln/detail/CVE-2018-8290ghsaADVISORY
- www.securityfocus.com/bid/104644mitrevdb-entryx_refsource_BID
- www.securitytracker.com/id/1041256mitrevdb-entryx_refsource_SECTRACK
- github.com/chakra-core/ChakraCore/commit/8bd6826aea01ff1af36f2a83fe00c44799ba80cbghsaWEB
- github.com/chakra-core/ChakraCore/pull/5444ghsaWEB
- portal.msrc.microsoft.com/en-US/security-guidance/advisory/CVE-2018-8290ghsax_refsource_CONFIRMWEB
- web.archive.org/web/20210125211407/http://www.securityfocus.com/bid/104644ghsaWEB
- web.archive.org/web/20211202002348/http://www.securitytracker.com/id/1041256ghsaWEB
News mentions
0No linked articles in our index yet.