🔍 CVE-2022-39382

9.8
CVSS Score
CRITICAL
2022-11-03
2026-06-17 04:58
✅ 완료

🇰🇷 한글 설명

Keystone CMS의 특정 버전에서 NODE_ENV 환경 변수가 사용자 코드 내에서 강제로 'development'로 인라인 처리되는 취약점이 발견되었습니다. 이로 인해 운영 환경에서도 보안 민감한 기능이 개발 모드처럼 동작하여 보안 설정이 무력화될 위험이 있습니다. 해당 문제는 @keystone-6/core 3.0.2 버전에서 수정되었습니다.

💡 쉬운 설명

프로그램이 실제 서비스 중임에도 불구하고, 내부 설정이 '개발 중'인 상태로 잘못 인식되는 문제입니다. 이로 인해 보안이 약한 개발용 설정이 적용되어 해킹 위험이 높아질 수 있습니다.

🇺🇸 원문 (English)

Keystone is a headless CMS for Node.js — built with GraphQL and React.`@keystone-6/[email protected] || 3.0.1` users that use `NODE_ENV` to trigger security-sensitive functionality in their production builds are vulnerable to `NODE_ENV` being inlined to `"development"` for user code, irrespective of what your environment variables. If you do not use `NODE_ENV` in your user code to trigger security-sensitive functionality, you are not impacted by this vulnerability. Any dependencies that use `NODE_ENV` to trigger particular behaviors (optimizations, security or otherwise) should still respect your environment's configured `NODE_ENV` variable. The application's dependencies, as found in `node_modules` (including `@keystone-6/core`), are typically not compiled as part of this process, and thus should be unaffected. We have tested this assumption by verifying that `NODE_ENV=production yarn keystone start` still uses secure cookies when using `statelessSessions`. This vulnerability has been fixed in @keystone-6/[email protected], regression tests have been added for this vulnerability in #8063.

📍 영향받는 시스템

@keystone-6/core 버전 3.0.0 및 3.0.1

⚔️ 공격 벡터

사용자 정의 코드 내에서 NODE_ENV를 사용하여 보안 설정을 제어할 경우, 환경 변수와 상관없이 개발 모드로 동작하게 유도함

🛡️ 대응 방법

@keystone-6/core 패키지를 3.0.2 이상의 최신 버전으로 업데이트하십시오.

🔧 검증 코드

출력된 버전이 3.0.0 또는 3.0.1인 경우 취약한 상태이며, 3.0.2 이상이면 안전합니다.

Shell / Script
npm list @keystone-6/core | grep @keystone-6/core

📊 CVSS Vector String

CVSS Vector
CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H

💻 영향받는 소프트웨어

Node.js