Giter VIP home page Giter VIP logo

st2-048's Introduction

St2-048 Remote Code Execution Vulnerability

Apache Struts 2 possible RCE in the Struts Showcase app in the Struts 1 plugin example in the Struts 2.3.x series

http://struts.apache.org/docs/s2-048.html

https://cwiki.apache.org/confluence/display/WW/S2-048

Use-Age:

> python St2-048.py

set url : http://xx.xx.xx.xx:port/integration/saveGangster.action

cmd >>: whoami
root

cmd >>: cat /etc/passwd

Summary

Possible RCE in the Struts Showcase app in the Struts 1 plugin example in Struts 2.3.x series

  • Who should read this         All Struts 2 developers and users should read this

  • Impact of vulnerability        Possible RCE when using the Struts 2 Struts 1 plugin

  • Maximum security rating High

  • Recommendation Please read the Solution section

  • Affected Software Struts 2.3.x with Struts 1 plugin and Struts 1 action

  • Reporter icez from Tophant Competence Center

  • CVE Identifier CVE-2017-9791

Problem

It is possible to perform a RCE attack with a malicious field value when using the Struts 2 Struts 1 plugin and it's a Struts 1 action and the value is a part of a message presented to the user, i.e. when using untrusted input as a part of the error message in the ActionMessage class.

Solution

Always use resource keys instead of passing a raw message to the ActionMessage as shown below, never pass a raw value directly

messages.add("msg", new ActionMessage("struts1.gangsterAdded", gform.getName()));

and never like this

messages.add("msg", new ActionMessage("Gangster " + gform.getName() + " was added"));

Backward compatibility

No backward incompatibility issues are expected.

参考文章链接:

【漏洞分析】Struts2高危漏洞S2-048分析

http://m.bobao.360.cn/learning/detail/4078.html

st2-048's People

Contributors

jas502n avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.