Network Security Internet Technology Development Database Servers Mobile Phone Android Software Apple Software Computer Software News IT Information

In addition to Weibo, there is also WeChat

Please pay attention

WeChat public account

Shulou

How to reproduce Ruby on Rails path traversal and arbitrary file reading vulnerability CVE-2019-5418

2025-03-29 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Network Security >

Share

Shulou(Shulou.com)05/31 Report--

This issue of the content of the editor will bring you about how to carry out Ruby on Rails path traversal and arbitrary file reading vulnerability CVE-2019-5418 reproduction, the article is rich in content and professional analysis and description for you, I hope you can get something after reading this article.

Brief introduction of vulnerabilities:

Ruby on Rails is a web application framework and a relatively new web application framework.

Built on Ruby language

Threat Typ

Remote code execution, arbitrary file reading

Threat level

High

Vulnerability number

CVE-2019-5418

Affected system and application version

Full version of Rails

In which the repaired version

6.0.0.beta3

5.2.2.1

5.1.6.2

5.0.7.2

4.2.11.1

Loophole recurrence: 1. Build the environment

Ruby On Rails environment construction

1. Install git

2. Install rbenv to the ~ / .rbenv directory

3. Install the plug in rbenv for compiling and installing ruby

4. It is optional to manage gemset, because there is no need for bundler.

5. After installing gem through the gem command, there is no need to enter the rbenv rehash command manually

Update rbenv and all plug-ins through the rbenv update command

7. Use Ruby China image to install Ruby, which is recommended by domestic users

8. Then you need to put the following two lines of code in the configuration file of bash:

9. Execute the following command to make it effective

Source / .bashrc

10. Install ruby

Execute "rails s" under the demo path to start the service

Specify port 9876

Access the "chybeta" path:

We use the developer tool that comes with the browser to reproduce the vulnerability. Press "f12" to open the tool and modify the request as follows:

The vulnerability was successfully reproduced and the contents of the passwd file were successfully read:

2. Repair it is recommended to use the version that has fixed the vulnerability. The above is how to perform Ruby on Rails path traversal and arbitrary file reading vulnerability CVE-2019-5418 has been reproduced. If you happen to have similar doubts, please refer to the above analysis to understand. If you want to know more about it, you are welcome to follow the industry information channel.

Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.

Views: 0

*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.

Share To

Network Security

Wechat

© 2024 shulou.com SLNews company. All rights reserved.

12
Report