Skip to content

Commit bc6d3f9

Browse files
Copilotmarocchinoyous
authored
Translate CVE-2026-41316 (ko) (#3918)
* Add Korean translation for CVE-2026-41316 (ERB deserialization guard bypass) Agent-Logs-Url: https://github.com/ruby/www.ruby-lang.org/sessions/5d22ca24-0f38-43f4-8adf-50871c0d5d08 Co-authored-by: marocchino <128431+marocchino@users.noreply.github.com> * Apply suggestions from code review Co-authored-by: marocchino <marocchino@users.noreply.github.com> * Apply suggestions from code review Co-authored-by: Chayoung You <yousbe@gmail.com> --------- Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com> Co-authored-by: marocchino <128431+marocchino@users.noreply.github.com> Co-authored-by: marocchino <marocchino@users.noreply.github.com> Co-authored-by: Chayoung You <yousbe@gmail.com>
1 parent ac15767 commit bc6d3f9

1 file changed

Lines changed: 41 additions & 0 deletions

File tree

Lines changed: 41 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,41 @@
1+
---
2+
layout: news_post
3+
title: "CVE-2026-41316: def_module / def_method / def_class를 통한 ERB @_init 역직렬화 가드 우회"
4+
author: "k0kubun"
5+
translator: "copilot"
6+
date: 2026-04-21 07:51:00 +0000
7+
tags: security
8+
lang: ko
9+
---
10+
11+
CVE-2026-41316에 대한 보안 권고를 공개했습니다.
12+
13+
## CVE-2026-41316: def\_module / def\_method / def\_class를 통한 ERB @\_init 역직렬화 가드 우회
14+
15+
ERB에서 역직렬화 취약점이 발견되었습니다. 이 취약점은 CVE 번호 [CVE-2026-41316](https://www.cve.org/CVERecord?id=CVE-2026-41316)으로 등록되었습니다. erb gem을 업그레이드하기를 추천합니다.
16+
17+
### 영향 범위
18+
19+
신뢰할 수 없는 데이터에 대해 `Marshal.load`를 호출하고 `erb``activesupport`가 모두 로드되어 있는 모든 Ruby 애플리케이션은 임의 코드 실행에 취약합니다. 다음을 포함합니다.
20+
21+
- **신뢰할 수 없는 직렬화 데이터를 가져오는 Ruby on Rails 애플리케이션** -- 캐싱, 데이터 가져오기, IPC에 Marshal.load를 사용하는 모든 Rails 앱(모든 Rails 앱은 ActiveSupport와 ERB를 모두 로드함)
22+
- **신뢰할 수 없는 직렬화 데이터를 가져오는 Ruby 도구** -- 캐싱, 데이터 가져오기, IPC에 `Marshal.load`를 사용하는 모든 도구
23+
- **레거시 Rails 앱** (7.0 이전) -- 쿠키 세션 직렬화에 여전히 Marshal을 사용하는 앱
24+
25+
### 세부 내용
26+
27+
ERB는 신뢰할 수 없는 데이터에 대해 `Marshal.load`로 ERB 객체를 재구성할 때 코드 실행을 방지하기 위해 `@_init` 가드를 구현합니다. 그러나 `ERB#def_method`, `ERB#def_module`, `ERB#def_class`는 이 가드를 확인하지 않고 템플릿 소스를 평가하므로, `Marshal.load`에 전달되는 데이터를 제어하는 공격자가 보호를 우회하여 임의 코드를 실행할 수 있습니다. 특히 `def_module`은 인수를 받지 않으므로, 역직렬화 가젯 체인의 일부로 간단히 호출할 수 있습니다.
28+
29+
erb gem을 4.0.3.1, 4.0.4.1, 6.0.1.1, 6.0.4 이상으로 업데이트하세요.
30+
31+
### 해당 버전
32+
33+
* erb gem 6.0.3 이하
34+
35+
### 도움을 준 사람
36+
37+
이 문제를 발견해 준 [TristanInSec](https://github.com/TristanInSec)에게 감사를 표합니다.
38+
39+
## 수정 이력
40+
41+
* 2026-04-21 07:51:00 (UTC) 최초 공개

0 commit comments

Comments
 (0)