CVE-2016-1000305
Ruby 취약성 분석 및 완화

개요

CVE-2016-1000305 is a directory traversal vulnerability in the guard-livereload Ruby gem that allows remote attackers to read arbitrary files on the server by exploiting improper path validation in the livereload WebSocket server functionality. It affects all versions of guard-livereload before 2.5.2, and was originally discovered and reported on February 4, 2016, with the CVE identifier assigned by the DWF (Distributed Weakness Filing) project. The vulnerability was formally published to the GitHub Advisory Database in July 2026 under GHSA-g65v-27r3-5p6m. It carries a CVSS v4.0 base score of 6.9 (Medium) and a CVSS v3 score of 5.3 (Medium) (GitHub Advisory, Ruby Advisory DB).

기술적 세부 사항

The root cause is CWE-22 (Improper Limitation of a Pathname to a Restricted Directory — Path Traversal), where the _serve method in lib/guard/livereload/websocket.rb failed to sanitize file paths before serving them over the livereload WebSocket socket (default port 35729). An attacker could send a specially crafted HTTP GET request to the livereload socket with a path such as ./../../etc/passwd, which the server would expand to ../../../etc/passwd and serve the contents of any user-readable file to the requester — no authentication required. The fix (commit 0e98469) changed the behavior so that requests for any file other than ./livereload.js now return a 403 Forbidden response instead of serving the file (GitHub PR #158, GitHub Advisory).

영향

Successful exploitation allows any attacker who can reach the livereload WebSocket port to read arbitrary files accessible to the user running the livereload server process, including sensitive files such as /etc/passwd, application configuration files, private keys, or credentials. There is no impact on integrity or availability, but the confidentiality risk is significant in multi-user server environments or when the WebSocket port is exposed beyond localhost. The vulnerability is particularly dangerous when the livereload socket is bound to a non-local address or when the port is forwarded to untrusted or multi-user remote machines (GitHub Issue #159, GitHub Advisory).

착취 단계

  1. Reconnaissance: Identify servers running guard-livereload (versions < 2.5.2) with the livereload WebSocket port (default: 35729) accessible — either directly on the network, via localhost, or through port forwarding.
  2. Connect to the livereload socket: Use a tool such as curl, netcat, or a WebSocket client to connect to the target's livereload socket (e.g., http://target:35729/).
  3. Craft a path traversal request: Send a specially crafted HTTP GET request with a traversal payload in the path, for example:
    GET ./../../etc/passwd HTTP/1.1
    Host: target:35729
    The leading ./ causes the path to be expanded by the server to ../../../etc/passwd.
  4. Receive file contents: The vulnerable server serves the contents of the requested file (e.g., /etc/passwd) directly over the socket, exposing sensitive data to the attacker (GitHub PR #158, GitHub Issue #159).

타협의 징후

  • Network: Unexpected HTTP GET requests to port 35729 (livereload default) containing path traversal sequences such as ./../../, ../, or encoded variants; connections to the livereload port from untrusted or external IP addresses.
  • Logs: Web server or application logs showing GET requests to the livereload socket with unusual path components (e.g., ./../../etc/passwd, ./../../home/user/.ssh/id_rsa).
  • Process: The Ruby process running guard-livereload reading files outside the project/web root directory, observable via system call tracing (e.g., strace, auditd file access logs).

완화 및 해결 방법

Upgrade guard-livereload to version 2.5.2 or later, which restricts file serving over the WebSocket socket to only ./livereload.js and returns a 403 Forbidden for all other file requests. As a workaround, ensure the livereload WebSocket port (default: 35729) is bound only to localhost (127.0.0.1) and is not exposed to untrusted networks or forwarded to remote machines. The Ruby Advisory DB notes that the gem may not have been re-released after the fix, and recommends considering migration to rack-livereload as an alternative (GitHub Advisory, Ruby Advisory DB).

추가 자료


근원이 보고서는 AI를 사용하여 생성되었습니다.

관련 Ruby 취약점:

CVE ID

심각도

점수

기술

구성 요소 이름

CISA KEV 익스플로잇

수정 사항이 있습니다.

게시된 날짜

CVE-2016-1000305MEDIUM6.9
  • Ruby logoRuby
  • guard-livereload
아니요Jul 31, 2026
CVE-2026-45377MEDIUM6.5
  • Ruby logoRuby
  • decidim-core
아니요Jul 31, 2026
CVE-2026-45376MEDIUM5.5
  • Ruby logoRuby
  • decidim-admin
아니요Jul 31, 2026
CVE-2026-45086MEDIUM5.4
  • Ruby logoRuby
  • decidim-demographics
아니요Jul 31, 2026
CVE-2026-45330MEDIUM4.9
  • Ruby logoRuby
  • decidim-verifications
아니요Jul 31, 2026

무료 취약성 평가

클라우드 보안 태세를 벤치마킹합니다

9개의 보안 도메인에서 클라우드 보안 관행을 평가하여 위험 수준을 벤치마킹하고 방어의 허점을 식별합니다.

평가 요청

추가 Wiz 리소스

맞춤형 데모 받기

맞춤형 데모 신청하기

"내가 본 최고의 사용자 경험은 클라우드 워크로드에 대한 완전한 가시성을 제공합니다."
데이비드 에슬릭최고정보책임자(CISO)
"Wiz는 클라우드 환경에서 무슨 일이 일어나고 있는지 볼 수 있는 단일 창을 제공합니다."
아담 플레처최고 보안 책임자(CSO)
"우리는 Wiz가 무언가를 중요한 것으로 식별하면 실제로 중요하다는 것을 알고 있습니다."
그렉 포니아토프스키위협 및 취약성 관리 책임자