-
Notifications
You must be signed in to change notification settings - Fork 668
Translate CVE-2026-41316 (ko) #3918
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
+41
−0
Merged
Changes from 2 commits
Commits
Show all changes
3 commits
Select commit
Hold shift + click to select a range
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,41 @@ | ||
| --- | ||
| layout: news_post | ||
| title: "CVE-2026-41316: def_module / def_method / def_class를 통한 ERB @_init 역직렬화 가드 우회" | ||
| author: "k0kubun" | ||
| translator: "copilot" | ||
| date: 2026-04-21 07:51:00 +0000 | ||
| tags: security | ||
| lang: ko | ||
| --- | ||
|
|
||
| CVE-2026-41316에 대한 보안 권고를 공개했습니다. | ||
|
|
||
| ## CVE-2026-41316: def\_module / def\_method / def\_class를 통한 ERB @\_init 역직렬화 가드 우회 | ||
|
|
||
| ERB에서 역직렬화 취약점이 발견되었습니다. 이 취약점은 CVE 번호 [CVE-2026-41316](https://www.cve.org/CVERecord?id=CVE-2026-41316)로 등록되었습니다. erb gem을 업그레이드하기를 추천합니다. | ||
|
|
||
| ### 영향 범위 | ||
|
|
||
| 신뢰할 수 없는 데이터에 대해 `Marshal.load`를 호출하고 `erb`와 `activesupport`가 모두 로드되어 있는 모든 Ruby 애플리케이션은 임의 코드 실행에 취약합니다. 다음을 포함합니다. | ||
|
|
||
| - **신뢰할 수 없는 직렬화 데이터를 가져오는 Ruby on Rails 애플리케이션** -- 캐싱, 데이터 가져오기 또는 IPC에 Marshal.load를 사용하는 모든 Rails 앱(모든 Rails 앱은 ActiveSupport와 ERB를 모두 로드함) | ||
| - **신뢰할 수 없는 직렬화 데이터를 가져오는 Ruby 도구** -- 캐싱, 데이터 가져오기 또는 IPC에 `Marshal.load`를 사용하는 모든 도구 | ||
|
marocchino marked this conversation as resolved.
Outdated
|
||
| - **레거시 Rails 앱** (7.0 이전) -- 쿠키 세션 직렬화에 여전히 Marshal을 사용하는 앱 | ||
|
|
||
| ### 세부 내용 | ||
|
|
||
| ERB는 신뢰할 수 없는 데이터에 대해 `Marshal.load`로 ERB 객체를 재구성할 때 코드 실행을 방지하기 위해 `@_init` 가드를 구현합니다. 그러나 `ERB#def_method`, `ERB#def_module`, `ERB#def_class`는 이 가드를 확인하지 않고 템플릿 소스를 평가하므로, `Marshal.load`에 전달되는 데이터를 제어하는 공격자가 보호를 우회하여 임의 코드를 실행할 수 있습니다. 특히 `def_module`은 인수를 받지 않으므로, 역직렬화 가젯 체인의 일부로 간단히 호출할 수 있습니다. | ||
|
|
||
| erb gem을 4.0.3.1, 4.0.4.1, 6.0.1.1, 6.0.4 이상으로 업데이트하세요. | ||
|
|
||
| ### 해당 버전 | ||
|
|
||
| * erb gem 6.0.3 이하 | ||
|
|
||
| ### 도움을 준 사람 | ||
|
|
||
| 이 문제를 발견해 준 [TristanInSec](https://github.com/TristanInSec)에게 감사를 표합니다. | ||
|
|
||
| ## 수정 이력 | ||
|
|
||
| * 2026-04-21 07:51:00 (UTC) 최초 공개 | ||
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.