Skip to content

Instantly share code, notes, and snippets.

@UniDyne
Last active November 20, 2025 21:50
Show Gist options
  • Select an option

  • Save UniDyne/f72fe89b0957495961b8737f9339b9ca to your computer and use it in GitHub Desktop.

Select an option

Save UniDyne/f72fe89b0957495961b8737f9339b9ca to your computer and use it in GitHub Desktop.
JScript Runtime - Global Scope

Crashing CScript / WScript OOB Execution

This script demonstrates a possible issue whereby Windows Script Host will crash with an out-of-bounds exception when trying to access the global scope within JScript. This is a new bug that was introduced with a recent patch to the Scripting Host in Windows 10 and 11.

<?xml version="1.0" encoding="utf-8"?>
<package>
<job id="Test">
<script language="JScript"><![CDATA[
!function(global) {
global.testMe = function() {
// this never executes
WScript.StdOut.WriteLine("Got here.");
return "test";
};
}(this);
function main() {
// outputs 'function'
WScript.StdOut.WriteLine(typeof testMe);
// does nothing
var x = testMe();
WScript.StdOut.WriteLine(x);
}
main();
testMe();
]]></script>
</job>
</package>
@UniDyne
Copy link
Author

UniDyne commented Aug 22, 2025

0xc0000005 is a memory access violation. Is it exploitable?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment