vuln-intel취약점 정보 통합 DB

← 목록

CVE-2025-14847

위험도 높음 실제 악용 (KEV) 공격 코드 공개 ASEC 언급 5건

우선순위 이 사이트의 참고 점수
15.36
위험도 CVSS 3.1 · 0~10점
7.5
악용 가능성 EPSS · 30일 안에 공격에 쓰일 확률
78.5%
공개일 NVD
2025-12-19

설명 NVD 원문

Zlib 압축 프로토콜 헤더의 길이 필드가 일치하지 않으면, 인증되지 않은 클라이언트가 초기화되지 않은 힙 메모리를 읽을 수 있다. 이 문제는 다음 버전에 영향을 미친다: MongoDB Server v7.0 7.0.28 미만 모든 버전, MongoDB Server v8.0 8.0.17 미만 버전, MongoDB Server v8.2 8.2.3 미만 버전, MongoDB Server v6.0 6.0.27 미만 버전, MongoDB Server v5.0 5.0.32 미만 버전, MongoDB Server v4.4 4.4.30 미만 버전, MongoDB Server v4.2 4.2.0 이상 버전, MongoDB Server v4.0 4.0.0 이상 버전, MongoDB Server v3.6 3.6.0 이상 버전.

Claude 로 기계 번역한 글입니다. 정확한 내용은 영어 원문을 확인하세요.

영어 원문

Mismatched length fields in Zlib compressed protocol headers may allow a read of uninitialized heap memory by an unauthenticated client. This issue affects all MongoDB Server v7.0 prior to 7.0.28 versions, MongoDB Server v8.0 versions prior to 8.0.17, MongoDB Server v8.2 versions prior to 8.2.3, MongoDB Server v6.0 versions prior to 6.0.27, MongoDB Server v5.0 versions prior to 5.0.32, MongoDB Server v4.4 versions prior to 4.4.30, MongoDB Server v4.2 versions greater than or equal to 4.2.0, MongoDB Server v4.0 versions greater than or equal to 4.0.0, and MongoDB Server v3.6 versions greater than or equal to 3.6.0.

위험도 세부 항목 CVSS 3.1

공격 경로
네트워크(원격) AV:N
공격 난이도
낮음(쉬움) AC:L
필요한 권한
없음(로그인 불필요) PR:N
사용자 행동 필요
필요 없음 UI:N
영향 범위
그 제품 안 S:U
정보 유출(기밀성)
높음 C:H
데이터 변조(무결성)
없음 I:N
서비스 중단(가용성)
없음 A:N

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

조치 방법 0행

수집된 조치 정보가 없습니다. 조치가 필요 없다는 뜻은 아닙니다.

CISA 조치 권고 KEV

제조사 안내에 따라 완화 조치를 적용하세요. 클라우드 서비스는 BOD 22-01 지침을 따르고, 완화 방법이 없으면 제품 사용을 중단하세요.

영어 원문

Apply mitigations per vendor instructions, follow applicable BOD 22-01 guidance for cloud services, or discontinue use of the product if mitigations are unavailable.

미국 연방기관 조치 기한: 2026-01-19

살펴볼 장비 초안

공격 대상: 서버·웹 서비스. '이 장비에서 살펴볼 취약점' 이라는 분류이며, 장비가 탐지한다는 확인이 아닙니다.

미분류 — 현재 규칙으로는 장비를 정하지 못했습니다. 안전하다는 뜻이 아닙니다.

단계별 판정 예시 환경

시나리오 미작성 — 이 CVE 는 단계별 판정을 하지 않았습니다. 안전하다는 뜻이 아닙니다.

출처별 내용 7건

CISA KEV MongoDB and MongoDB Server Improper Handling of Length Parameter Inconsistency Vulnerability 2025-12-29

원문 보기

Apply mitigations per vendor instructions, follow applicable BOD 22-01 guidance for cloud services, or discontinue use of the product if mitigations are unavailable.

KISA MongoDB 제품 보안 업데이트 권고 2025-12-26

원문 보기

□ 개요 o MongoDB社는 자사 제품에서 발생하는 취약점을 해결한 보안 업데이트 발표 [1] o 영향받는 버전을 사용 중인 사용자는 해결 방안에 따라 최신 버전으로 업데이트 권고 □ 설명 o MongoDB에서 발생하는 초기화되지 않은 힙 메모리 반환 취약점(CVE-2025-14847) [1][2] □ 영향받는 제품 및 해결 방안 취약점 제품명 영향받는 버전 해결 버전 CVE-2025-14847 MongoDB 8.2.0 이상 ~ 8.2.3 미만 8.2.3 8.0.0 이상 ~ 8.0.17 미만 8.0.17 7.0.0 이상 ~ 7.0.28 미만 7.0.28 6.0.0 이상 ~ 6.0.27 미만 6.0.27 5.0.0 이상 ~ 5.0.32 미만 5.0.32 4.4.0 이상 ~ 4.4.30 미만 4.4.30 모든 v4.2 버전 해결 버전으로 마이그레이션 (4.4.30) 모든 v4.0 버전 해결 버전으로 마이그레이션 (4.4.30) 모든 v3.6 버전 해결 버전으로 마이그레이션 (4.4.30) ※ 하단의 참고사이트를 확인하여 업데이트 수행 [1] □ 참고사이트 [1] https://jira.mongodb.org/browse/SERVER-115508 [2] https://nvd.nist.gov/vuln/detail/CVE-2025-14847 □ 문의사항 o 한국인터넷진흥원 사이버민원센터: 국번없이 118 □ 작성: 위협분석단 취약점분석팀

ASEC MongoBleed(CVE-2025-14847): 8년간 숨겨져 있던 치명적 MongoDB 메모리 유출 취약점 2026-01-13

원문 보기

개요 2025년 말, MongoDB에서 장기간 잠복해 있던 고위험(High) 수준의 메모리 정보 노출 취약점이 공개되었다. MongoBleed로 이름 붙여진 이 취약점은 인증하지 않은 상태에서 초기화되지 않은 힙 메모리를 읽을 수 있고, 이로 인해 민감 정보가 유출될 수 있다. 또한 CISA는 이 취약점을 KEV 목록에 등재하며 실제 악용 정황이 있음을 전제로 신속한 대응을 권고했다. 본 글은 MongoBleed(CVE-2025-14847)의 발생 원리와 공격 흐름을 정리하고, 8년간 발견되지 못한 이유와 해당 취약점의 대응 방안을 소개한다. 기술 배경 1. MongoDB 와이어 프로토콜과 메시지 압축 MongoDB는 클라이언트-서버 간 통신에 HTTP 대신 자체 바이너리 프로토콜인 MongoDB 와이어 프로토콜(Wire Protocol)을 사용한다. 기존에는 OP_QUERY, OP_INSERT 등 다양한 opcode를 사용했으나, MongoDB 5.1 이후 대부분의 작업이 OP_MSG로 통합되었다. OP_MSG는 BSON 형식의 페이로드를 전송하는 확장 가능한 메시지 포맷이다. 2017년 MongoDB 3.6부터 zlib 메시지 압축 기능이 도입되어 네트워크 전송량을 줄일 수 있는 선택지가 확대되었다. MongoDB는 snappy, zlib, zstd 세 가지 압축 알고리즘을 지원하는데, 클라이언트와 서버는 핸드셰이크 과정에서 사용할 알고리즘을 협상한다. 압축이 활성화되면 기존 메시지가 OP_COMPRESSED 메시지로 래핑되어 전송된다. [그림 1] OP_COMPRESSED 메시지 구조 OP_COMPRESSED 메시지에는 MsgHeader(16바이트), originalOpcode(4바이트), uncompressedSize(4바이트), compressorId(1바이트), 그리고 압축된 페이로드가 포함된다. uncompressedSize 필드 값을 검증 없이 신뢰하기 때문에, 해당 값을 그대로 활용하게 되면 실제 데이터보다 큰 메모리 버퍼를 할당시킬 수 있게 된다. 2. BSON 형식과 파싱 메커니즘 BSON(Binary JSON)은 MongoDB의 기본 데이터 형식으로 JSON-like 문서를 바이너리로 직렬화한 포맷이며, 필드명(element name)은 null-terminated 문자열(cstring)로 표현된다. [그림 2] BSON 구조 MongoDB 서버는 BSON 데이터를 메모리에서 순차적으로 파싱한다. 파서는 먼저 문서의 전체 크기를 읽고 각 필드를 하나씩 읽어나가는데, 각 필드를 읽을 때 타입 바이트를 확인한 후 null terminator를 찾을 때까지 필드명을 읽는다. 파싱 과정에서 예상치 못한 데이터 구조를 만나면 MongoDB는 파싱을 중단하고 에러를 반환하며, 에러 메시지에는 문제가 발생한 필드명이 포함될 수 있다. CVE-2025-14847 취약점 원인 MongoBleed 취약점은 src/mongo/transport/message_compressor_zlib.cpp 파일의 ZlibMessage Compressor::decompressData() 함수의 길이 처리 로직 문제와 BSON 파싱 과정의 연계로 발생한다. 각 문제의 원인을 살펴보자. 1. decompressData [그림 3] decompressData 함수 이 함수는 OP_COMPRESSED 메시지를 수신했을 때 압축된 데이터를 해제하는 역할을 한다. 함수는 두 개의 매개변수를 받는다. input은 압축된 데이터를 담고 있는 ConstDataRange 객체이고, output은 압축 해제된 데이터를 저장할 버퍼인 DataRange 객체이다. 함수는 먼저 length 변수를 선언하고 output.length()로 초기화한다. 여기서 output.length()는 할당된 버퍼의 전체 크기를 반환한다. 그 다음 zlib의 uncompress() 함수를 호출하여 실제 압축 해제를 수행한다. uncompress() 함수의 시그니처는 int uncompress(Bytef *dest, uLongf *destLen, const Bytef *source, uLong sourceLen)이다. destLen은 입출력 매개변수(in-out parameter)로, 호출 전에는 dest 버퍼의 할당 크기를 나타내고, 호출 후에는 실제로 압축 해제된 데이터의 크기로 업데이트된다. 핵심 결함은 함수의 반환값 처리에 있다. decompressData() 함수는 uncompress()가 업데이트한 length 값이 아니라, 원래 할당된 버퍼 크기인 output.length() 값을 반환한다. 2. BSON 파싱과 메모리 유출 decompressData() 함수가 잘못된 크기를 반환하면, 초기화되지 않은 메모리가 포함된 큰 버퍼의 데이터가 유효한 데이터로 취급된다. 공격자는 OP_COMPRESSED 메시지의 uncompressedSize 필드를 조작하여 서버가 실제 데이터보다 큰 버퍼를 할당하도록 만든다. 정상적인 경우 필드명은 유효한 데이터 영역 내에서 null terminator로 끝나지만, 반환된 버퍼 크기가 잘못된 경우 파서는 유효한 데이터 경계를 넘어 초기화되지 않은 메모리 영역까지 읽게 된다. 이 초기화되지 않은 메모리에는 이전에 힙에 있던 문자열/조각이 남아 있을 수 있으며, 파서는 이를 필드명으로 인식하려고 시도한다. 초기화되지 않은 메모리에서 우연히 null 바이트를 만나면, 파서는 그 지점까지의 바이트들을 필드명으로 인식한다. BSON 구조가 유효하지 않으므로 파싱이 실패하고, MongoDB는 에러 메시지를 생성하는데, 이 에러 메시지에는 유출된 메모리 내용이 포함된다. 공격자는 이러한 에러 응답을 반복적으로 수집하여 서버 메모리의 민감한 정보를 획득할 수 있다. 공격 시나리오 [그림 4] MongoBleed 공격 시나리오 흐름도 취약한 MongoDB 인스턴스를 전제로 공격이 이뤄질 경우 [그림 4]와 같이 데이터 유출이 발생할 수 있다. 공격자는 zlib 기반 OP_COMPRESSED 메시지의 길이/헤더 값을 비정상적으로 구성한 조작 패킷을 인증 없이 전송한다. 서버는 인증 처리 이전 단계에서 이를 압축 해제 로직으로 처리하며, 이 과정에서 헤더의 길이 정보와 실제 처리 길이의 불일치로 인해 “실제 압축 해제된 데이터 길이”와 “할당된 버퍼 길이”가 어긋나는 오류 조건이 발생한다. 그 결과 서버가 유효 데이터 길이보다 큰 길이를 후속 처리에 사용하게 되며, 버퍼의 남는 영역에 존재하던 초기화되지 않은 힙 메모리 조각이 응답 경로로 섞여 클라이언트에 노출될 수 있다. 노출되는 데이터는 단발성으로는 단편일 수 있으나, 공격 시도 과정에서 민감 정보(예시 : 토큰, 키, 자격증명 등)의 일부가 조각 형태로 유출될 가능성이 존재한다. 실제로 2025년 12월 말, 한 대형 온라인 게임 서비스 사업자에서 계정/운영 시스템 이상 징후와 서비스 장애가 동반된 보안 사고가 발생했으며, 일부 보도와 보안 커뮤니티 분석에서는 그 원인 후보 중 하나로 MongoBleed(CVE-2025-14847) 악용 가능성을 언급한 바 있다. 장기간 취약점 미발견 이유 본 취약점이 장기간 드러나지 않은 배경에는, 동일한 입력을 넣어도 노출되는 결과가 매번 달라질 수 있는 특성이 크게 작용한다. 이 유형의 메모리 정보 노출은 힙 레이아웃, 할당/해제 타이밍, 워크로드에 따른 메모리 상태에 영향을 받아 재현이 달라지며, 자동화 테스트나 일반 장애 분석 과정에서 일관된 패턴으로 묶기 어렵다. 운영 측면에서도 관측이 제한적이다. MongoDB의 기본 로그 설정(verbosity=0)은 Informational 로그 중심이며, 오류(Assertion/COMMAND)와 연관된 로그가 시스템 로그에 포함되려면 verbosity가 최소 1(Debug) 이상이어야 한다. 따라서 별도 설정 없이 운영하면 공격 트래픽이 유입되더라도 상세 원인을 식별할 로그가 남지 않아, 현장에서는 단순 연결 종료 또는 일시적 오류처럼 관측될 수 있다. 또한 이 이슈는 인증 이전 경로에서 트리거될 수 있고, 오류 응답이 정상 프로토콜 흐름 안에서 반환될 수 있어 단순 시그니처 기반 탐지나 단순 차단 규칙만으로는 구분이 제한적이라는 점을 언급할 수 있다. 대응 방안 MongoBleed 취약점에 대한 가장 확실한 대응 방법은 패치된 버전으로 즉시 업그레이드하는 것이다. 그러나 다양한 이유로 즉각적인 업데이트가 불가능할 경우, 몇 가지의 임시 완화 조치를 적용할 수 있다. 우선 MongoDB 인스턴스가 인터넷에 직접 노출되지 않도록 방화벽, ACL. VPC 등 네트워크 접근을 최소화한다. 또한 본 취약점은 zlib 기반 OP_COMPRESSED 처리 경로를 악용하므로, zlib 압축 설정을 비활성화하여 zlib 압축 메시지 처리를 차단(허용 목록에서 제거)하도록 한다. [그림 5] mongod.conf 파일 내 zlib 압축 비활성화 설정 로그 관점에서는 기본 설정(verbosity=0)에서 에러 단서가 충분히 남지 않을 수 있으므로, COMMAND 컴포넌트 verbosity를 1 이상으로 상향해 InvalidBSON 또는 Assertion while parsing command 같은 명령 파싱 실패 단서가 시스템 로그에 포함되도록 가시성을 확보한다. 안랩 대응 현황 안랩 제품군의 진단명 정보는 다음과 같다. AIPS/HIPS 탐지룰 MongoDB zlib Decompression Information Disclosure Vulnerability(MongoBleed)-1 결론 MongoBleed(CVE-2025-14847)는 단 한 줄의 길이 처리 오류가 장기간 누적되어 광범위한 위험으로 이어질 수 있음을 보여주는 사례이다. 공개 보도 및 스캔 결과에서는 당시 약 8.7만 대 규모의 인터넷 노출 인스턴스가 언급되기도 했다. MongoDB 사용자는 패치를 최우선으로 적용하고, 불가피한 경우 네트워크 노출을 차단하며 zlib 비활성화와 로그 가시성 강화를 병행해야 한다. 보안 전문가는 이러한 사례를 연구하여 유사한 취약점을 사전에 발견하고 예방하는 데 활용해야 하며, 소프트웨어 개발자는 보안이 기능보다 우선한다는 원칙을 명심해야 한다. 본 취약점에 대한 상세한 기술 분석은 AhnLab ATIP에서 제공하는 “ MongoBleed 취약점 분석 보고서 (CVE-2025-14847) – AhnLab TIP “를 통해 확인 가능하다. 출처 https://nvd.nist.gov/vuln/detail/CVE-2025-14847 https://github.com/mongodb/mongo/blob/r8.2.2/src/mongo/transport/message_compressor_manager.h https://www.abstract.security/blog/critical-mongodb-vulnerability-cve-2025-14847-mongobleed https://www.akamai.com/blog/security-research/cve-2025-14847-all-you-need-to-know-about-mongobleed https://censys.com/advisory/cve-2025-14847 AhnLab TIP 를 구독하시면 연관 IOC 및 상세 분석 정보를 추가적으로 확인하실 수 있습니다. 자세한 내용은 아래 배너를 클릭하여 확인해보세요.

ASEC MongoDB 제품 보안 업데이트 권고 (CVE-2025-14847) 2025-12-31

원문 보기

개요 MongoDB 제품에서 발생하는 취약점을 해결하는 보안 업데이트를 발표하였습니다. 해당하는 제품 사용자는 최신 버전으로 업데이트 하시기 바랍니다. 대상 제품 CVE-2025-14847 MongoDB 버전: 8.2.0 이상 8.2.3 미만 MongoDB 버전: 8.0.0 이상 8.0.16 이하 MongoDB 버전: 7.0.0 이상 7.0.26 이하 MongoDB 버전: 6.0.0 이상 6.0.26 이하 MongoDB 버전: 5.0.0 이상 5.0.31 이하 MongoDB 버전: 4.4.0 이상 4.4.29 이하 MongoDB Server 버전: 4.2 전체 버전 MongoDB Server 버전: 4.0 전체 버전 MongoDB Server 버전: 3.6 전체 버전 해결된 취약점 MongoDB 제품의 zlib 구현 오류로 인해 발생하는 인증되지 않은 환경에서 초기화되지 않은 힙 메모리 정보 노출 취약점(CVE-2025-14847) 취약점 패치 최신 업데이트를 통해 취약점 패치가 제공되었습니다. 참고 사이트의 안내에 따라 최신 취약점 패치 버전으로 업데이트 하시기 바랍니다. CVE-2025-14847 MongoDB 버전: 8.2.3 MongoDB 버전: 8.0.17 MongoDB 버전: 7.0.28 MongoDB 버전: 6.0.27 MongoDB 버전: 5.0.32 MongoDB 버전: 4.4.30 참고사이트 [1] Make minimally sized buffers for uncompressed Messages https://jira.mongodb.org/browse/SERVER-115508

ASEC 영어·일본어 등 다른 언어 글 3건
ASEC MongoBleed (CVE-2025-14847):8年間潜伏していた致命的な MongoDB メモリ情報漏えいの脆弱性 2026-01-15

원문 보기

概要 2025年末、MongoDB において長期間潜伏していた高危険度 (High) のメモリ情報漏えいの脆弱性が公開された。MongoBleed と名付けられた本脆弱性は、認証を伴わない状態で初期化されていないヒープメモリを読み取ることが可能であり、その結果、機密情報が漏えいする恐れがある。また、CISA は本脆弱性を KEV リストに登録し、実際に悪用されている可能性を前提として迅速な対応を推奨している。 本稿では、MongoBleed (CVE-2025-14847) の発生原理および攻撃フローを整理するとともに、8年間にわたり発見されなかった背景と、本脆弱性への対応策について解説する。 技術的背景 1. MongoDB ワイヤープロトコルとメッセージ圧縮 MongoDB は、クライアントとサーバー間の通信に HTTP ではなく、独自のバイナリプロトコルである MongoDB ワイヤープロトコル (Wire Protocol) を使用する。従来は OP_QUERY や OP_INSERT など複数の opcode が利用されていたが、MongoDB 5.1 以降、多くの処理が OP_MSG に統合された。OP_MSG は、BSON 形式のペイロードを送信する拡張性の高いメッセージフォーマットである。 2017年にリリースされた MongoDB 3.6 以降、zlib によるメッセージ圧縮機能が導入され、ネットワーク転送量を削減する選択肢が拡張された。MongoDB は snappy、zlib、zstd の3種類の圧縮アルゴリズムをサポートしており、クライアントとサーバーはハンドシェイク時に使用するアルゴリズムを交渉する。圧縮が有効な場合、既存のメッセージは OP_COMPRESSED メッセージとしてラップされ送信される。 [図 1] OP_COMPRESSED メッセージ構造 OP_COMPRESSED メッセージには、MsgHeader (16バイト)、originalOpcode (4バイト)、uncompressedSize (4バイト)、compressorId (1バイト)、そして圧縮されたペイロードが含まれる。uncompressedSize フィールドの値は検証されることなく信頼されるため、この値をそのまま用いることで、実際のデータサイズを超えるメモリバッファが割り当てられる可能性がある。 2. BSON 形式とパースメカニズム BSON (Binary JSON) は MongoDB の基本データ形式であり、JSON-like 文書をバイナリ形式で直列化したものである。フィールド名 (element name) は、null-terminated 文字列 (cstring) として表現される。 [図 2] BSON 構造 MongoDB サーバーは、BSON データをメモリ上で順次パースする。まず文書全体のサイズを読み取り、その後各フィールドを1つずつ読み取る。各フィールドの読み取り時にはタイプバイトを確認し、null terminator に到達するまでフィールド名を読み進める。パース中に想定外のデータ構造が検出された場合、MongoDB は処理を中断してエラーを返し、そのエラーメッセージには問題が発生したフィールド名が含まれることがある。 CVE-2025-14847 脆弱性の原因 MongoBleed 脆弱性は、src/mongo/transport/message_compressor_zlib.cpp に実装された ZlibMessage Compressor::decompressData() 関数における長さ処理の不備と BSON パース処理が連動することで発生する。以下に各要因を説明する。 1. decompressData [図 3] decompressData 関数 本関数は、OP_COMPRESSED メッセージを受信した際に圧縮データを展開する役割を担う。引数として、圧縮データを保持する ConstDataRange オブジェクトの input と、展開後データを格納するバッファである DataRange オブジェクトの output を受け取る。 関数はまず length 変数を宣言し、output.length() で初期化する。ここで output.length() は、割り当てられたバッファの全体サイズを返す。その後、zlib の uncompress() 関数を呼び出して実際の展開処理を行う。 uncompress() 関数のシグネチャは int uncompress (Bytef *dest, uLongf *destLen, const Bytef *source, uLong sourceLen) であり、destLen は入出力パラメータ (in-out parameter) である。呼び出し前は dest バッファのサイズを示し、呼び出し後には実際に展開されたデータサイズへと更新される。 本質的な欠陥は、戻り値の扱いにある。decompressData() 関数は、uncompress() によって更新された length 値ではなく、元々のバッファサイズである output.length() を返却してしまう。 2. BSON パースとメモリ漏えい decompressData() が誤ったサイズを返却すると、初期化されていないメモリを含む大きなバッファが有効なデータとして扱われる。攻撃者は OP_COMPRESSED メッセージの uncompressedSize フィールドを操作し、サーバーに実データよりも大きなバッファを割り当てさせる。 通常、フィールド名は有効なデータ領域内で null terminator を迎えるが、返却されたバッファサイズが不正な場合、パーサは有効データの境界を超えて初期化されていないメモリ領域まで読み込む。この領域には、過去にヒープ上に存在していた文字列や断片が残存している可能性があり、パーサはそれをフィールド名として解釈しようとする。 初期化されていないメモリ内で偶然 null バイトに遭遇すると、そこまでのバイト列がフィールド名として認識される。結果として BSON 構造が不正となりパースは失敗するが、その際に生成されるエラーメッセージには、漏えいしたメモリ内容が含まれる。攻撃者はこのエラー応答を繰り返し収集することで、サーバーメモリ内の機密情報を取得できる。 攻撃シナリオ [図 4] MongoBleed 攻撃シナリオのフロー図 脆弱な MongoDB インスタンスを前提とした場合、[図 4] のようにデータ漏えいが発生し得る。攻撃者は、zlib ベースの OP_COMPRESSED メッセージにおいて、長さやヘッダ情報を不正に構成した細工パケットを認証なしで送信する。サーバーは認証処理以前の段階でこれを展開処理に渡し、ヘッダ上の長さ情報と実際の処理長の不整合により、「実際に展開されたデータ長」と「割り当てられたバッファ長」が一致しないエラー状態が生じる。 その結果、サーバーは有効データ長を超えるサイズを後続処理に使用し、バッファの未使用領域に残存していた初期化されていないヒープメモリ断片が応答経路を通じてクライアントへ露出する可能性がある。漏えいするデータは断片的である場合が多いが、攻撃を繰り返す過程でトークン、鍵情報、認証情報などの機密データの一部が断片として流出する恐れがある。 実際に2025年12月末、ある大手オンラインゲームサービス事業者において、アカウント/運用システムの異常兆候およびサービス障害を伴うセキュリティインシデントが発生した。一部の報道やセキュリティコミュニティの分析では、その原因候補の一つとして MongoBleed (CVE-2025-14847) の悪用可能性が言及されている。 長期間発見されなかった理由 本脆弱性が長期間表面化しなかった背景には、同一入力であっても漏えい結果が毎回異なり得るという特性が大きく影響している。この種のメモリ情報漏えいは、ヒープレイアウト、メモリの割り当て・解放タイミング、ワークロードに依存したメモリ状態に左右されるため、再現性が低く、自動テストや一般的な障害解析において一貫したパターンとして把握しにくい。 運用面においても観測性は限定的である。MongoDB のデフォルトログ設定 (verbosity=0) は情報ログ中心であり、Assertion や COMMAND 関連のエラーをシステムログに出力するには verbosity を最低でも1 (Debug) 以上に設定する必要がある。そのため、特別な設定を行わずに運用している場合、攻撃トラフィックが流入しても詳細な原因を示すログが残らず、現場では単なる接続切断や一時的なエラーとして認識される可能性がある。 加えて、本問題は認証前の経路でトリガー可能であり、エラー応答も正規プロトコルの流れの中で返却されるため、単純なシグネチャベースの検知や単純な遮断ルールのみでは識別が困難である点も挙げられる。 対応策 MongoBleed 脆弱性への最も確実な対策は、修正済みバージョンへ直ちにアップグレードすることである。しかし、何らかの理由で即時更新が困難な場合には、暫定的な緩和策を講じることが可能である。まず、MongoDB インスタンスがインターネットに直接公開されないよう、ファイアウォール、ACL、VPC などを用いてネットワークアクセスを最小限に制限する。 また、本脆弱性は zlib ベースの OP_COMPRESSED 処理経路を悪用するため、zlib 圧縮設定を無効化し、zlib 圧縮メッセージの処理を遮断 (許可リストから除外) することが有効である。 [図 5] mongod.conf における zlib 圧縮無効化設定 ログの観点では、デフォルト設定 (verbosity=0) では十分なエラーの手掛かりが残らない可能性があるため、COMMAND コンポーネントの verbosity を1以上に引き上げ、InvalidBSON や Assertion while parsing command といったパース失敗の兆候がシステムログに出力されるよう可視性を確保する必要がある。 アンラボにおける対応状況 アンラボ製品群における検知名は以下のとおりである。 AIPS/HIPS 検知ルール MongoDB zlib Decompression Information Disclosure Vulnerability(MongoBleed)-1 結論 MongoBleed (CVE-2025-14847) は、わずか一行の長さ処理の誤りが、長期間にわたって蓄積され、広範なリスクへと発展し得ることを示した事例である。公開情報やスキャン結果によれば、当時およそ8万7千台規模のインターネット公開インスタンスが存在していたとされる。 MongoDB ユーザーは、パッチ適用を最優先とし、やむを得ない場合にはネットワーク露出の遮断、zlib 無効化、ログ可視性の強化を併用すべきである。セキュリティ専門家は本事例を研究し、類似の脆弱性を事前に発見・予防するために活用する必要がある。また、ソフトウェア開発者は「セキュリティは機能より優先される」という原則を常に念頭に置くべきである。本脆弱性に関する詳細な技術分析は、AhnLab ATIPが提供する「 MongoBleed 脆弱性分析報告書 (CVE-2025-14847) – AhnLab TIP 」にて確認できる。 出典 https://nvd.nist.gov/vuln/detail/CVE-2025-14847 https://github.com/mongodb/mongo/blob/r8.2.2/src/mongo/transport/message_compressor_manager.h https://www.abstract.security/blog/critical-mongodb-vulnerability-cve-2025-14847-mongobleed https://www.akamai.com/blog/security-research/cve-2025-14847-all-you-need-to-know-about-mongobleed https://censys.com/advisory/cve-2025-14847 関連 IOC および詳細な解析情報は、AhnLab の次世代脅威インテリジェンスプラットフォーム 「 AhnLab TIP 」 サブスクリプションサービスを通して確認できる。

ASEC MongoBleed (CVE-2025-14847): A Critical MongoDB Memory Leak Vulnerability Hidden for 8 Years 2026-01-13

원문 보기

Overview In late 2025, a high-severity memory information disclosure vulnerability that had been lurking in MongoDB for years was finally revealed. Dubbed MongoBleed, this flaw allows unauthenticated attackers to read uninitialized heap memory, potentially exposing sensitive information. The U.S. Cybersecurity and Infrastructure Security Agency (CISA) has added this vulnerability to its Known Exploited Vulnerabilities (KEV) catalog, signaling evidence of active exploitation and urging immediate remediation. This article breaks down the root cause of MongoBleed (CVE-2025-14847), explains the attack flow, explores why it remained undiscovered for eight years, and provides guidance on mitigation strategies. Technical Background 1. MongoDB Wire Protocol and Message Compression MongoDB uses its proprietary binary protocol, the MongoDB Wire Protocol, for client-server communication instead of HTTP. Historically, it relied on various opcodes such as OP_QUERY and OP_INSERT, but starting with MongoDB 5.1, most operations were consolidated under OP_MSG. This opcode (OP_MSG) provides an extensible message format that transmits payloads in BSON format. In 2017, with MongoDB 3.6, zlib-based message compression was introduced to reduce network traffic. MongoDB supports three compression algorithms: snappy, zlib, and zstd. During the handshake process, the client and server negotiate which algorithm to use. When compression is enabled, the original message is wrapped and transmitted as an OP_COMPRESSED message. [Figure 1] OP_COMPRESSED Message Structure An OP_COMPRESSED message contains a MsgHeader (16 bytes), originalOpcode (4 bytes), uncompressedSize (4 bytes), compressorId (1 byte), and the compressed payload. Because the uncompressedSize field is trusted without validation, directly using this value can lead to allocating a memory buffer larger than the actual data. 2. BSON Format and Parsing Mechanism BSON (Binary JSON) is MongoDB’s native data format, which serializes JSON-like documents into a binary representation. Field names (element names) are expressed as null-terminated strings (cstring). [Figure 2] BSON Structure The MongoDB server parses BSON data sequentially in memory. The parser first reads the document’s total size, then iterates through each field. For every field, it checks the type byte and then reads the field name until it encounters a null terminator. If the parser encounters an unexpected data structure during this process, MongoDB halts parsing and returns an error. The error message may include the name of the problematic field. Cause of CVE-2025-14847 The MongoBleed vulnerability arises from a length-handling flaw in the ZlibMessageCompressor::decompressData() function within src/mongo/transport/message_compressor_zlib.cpp, combined with how BSON parsing behaves. Let’s examine each contributing issue. 1. decompressData [Figure 3] decompressData Function This function is responsible for inflating compressed data when an OP_COMPRESSED message is received. It takes two parameters: input: a ConstDataRange object holding the compressed data. output: a DataRange object serving as the buffer for the decompressed data. The function first declares a length variable and initializes it with output.length(). Here, output.length() returns the total allocated size of the output buffer. It then calls zlib’s uncompress() function to perform the actual decompression. The uncompress() function has the signature: int uncompress(Bytef *dest, uLongf *destLen, const Bytef *source, uLong sourceLen). The destLen parameter is an in-out parameter: before the call, it represents the allocated size of the dest buffer; after the call, it is updated to the actual size of the decompressed data. The core flaw lies in the handling of the function’s return value. The decompressData() function returns the value output.length(), which is the originally allocated buffer size, instead of the length value updated by uncompress(). 2. BSON Parsing and Memory Leak If decompressData() returns an incorrect size, the server treats the contents of an oversized buffer—which may include uninitialized memory—as valid data. An attacker can manipulate the uncompressedSize field of an OP_COMPRESSED message to trick the server into allocating a buffer larger than the actual decompressed data. Under normal conditions, a field name ends with a null terminator within the valid data. However, if the returned buffer size is wrong, the parser may read past the legitimate data boundary into uninitialized memory. This uninitialized region can contain residual strings/fragments previously present on the heap, which the parser will attempt to interpret as a field name. If the parser happens to encounter a null byte in the uninitialized memory, it interprets all bytes up to that point as the field name. Since the BSON structure is invalid, parsing fails, and MongoDB generates an error message containing the leaked memory content. By repeatedly triggering such errors and collecting the responses, an attacker can harvest sensitive information from server memory. Attack Scenario [Figure 4] MongoBleed Attack Scenario Flowchart If an attacker targets a vulnerable MongoDB instance, data leakage can occur as illustrated in [Figure 4]. The attacker sends a crafted packet, an OP_COMPRESSED message using zlib compression, with abnormal length and header values without authentication. The server processes this packet during the pre-authentication stage, invoking the decompression logic. Due to the mismatch between the header’s length information and the actual decompressed size, an error condition arises where the server uses the allocated buffer size instead of the actual data length for subsequent operations. As a result, the server treats memory beyond the valid data length as part of the message. This leftover space may contain uninitialized heap fragments, which then get mixed into the response path and exposed to the client. While each leak may only reveal small fragments, repeated exploitation attempts can yield sensitive information such as tokens, keys, or credentials in partial form. In fact, in late December 2025, a major online gaming service provider experienced a security incident involving account anomalies and service disruptions. Some reports and security community analyses suggested that MongoBleed (CVE-2025-14847) exploitation was among the possible root causes. Why This Vulnerability Went Undetected for So Long The primary reason MongoBleed remained undiscovered for years lies in its highly non-deterministic nature. Even when identical input is provided, the leaked output can vary significantly. This type of memory disclosure depends on factors such as heap layout, allocation and deallocation timing, and the memory state influenced by workload. Because of this variability, reproducing the issue consistently is extremely difficult, making it hard to detect through automated testing or routine failure analysis. Operational visibility was also limited. MongoDB’s default logging configuration (verbosity=0) focuses on informational logs. For assertion or command-related errors to appear in system logs, verbosity must be set to at least 1 (Debug). Without this configuration, attack traffic leaves no detailed trace, and incidents may appear as simple connection drops or transient errors rather than indicators of a deeper problem. Another factor is that the vulnerability can be triggered before authentication and the resulting error response is returned within a normal protocol flow. This makes it difficult to distinguish using signature-based detection or simple blocking rules, further reducing the likelihood of discovery during standard monitoring or intrusion detection processes. Mitigation Strategies The most effective way to address the MongoBleed vulnerability is to upgrade immediately to a patched version. However, if an immediate update is not feasible for operational reasons, several temporary mitigation measures can be applied. First, ensure that MongoDB instances are not directly exposed to the internet. Network access should be minimized using firewalls, ACLs, or VPC configurations. Since this vulnerability exploits the zlib-based OP_COMPRESSED processing path, disabling zlib compression is another critical step. This can be done by removing zlib from the allowed compression algorithms in the configuration file, effectively blocking zlib-compressed messages from being processed. [Figure 5] Disabling zlib Compression in mongod.conf From a logging perspective, the default configuration (verbosity=0) may not provide sufficient clues about parsing errors. To improve visibility, increase the verbosity level for the COMMAND component to at least 1. This ensures that indicators such as InvalidBSON or Assertion while parsing command are captured in system logs, making it easier to detect abnormal parsing failures. AhnLab Response Status Detection names for AhnLab products is as follows. AIPS/HIPS Detection Rule MongoDB zlib Decompression Information Disclosure Vulnerability (MongoBleed)-1 Conclusion MongoBleed (CVE-2025-14847) is a striking example of how a single line of faulty length handling logic can accumulate over time and lead to widespread risk. Public reports and scanning results indicated that, at the time of disclosure, approximately 87,000 Internet-exposed instances were mentioned as potentially vulnerable. MongoDB users should prioritize applying the official patch immediately. If that is not possible, they must block network exposure, disable zlib compression, and strengthen log visibility as interim measures. Security professionals should study cases like this to proactively identify and prevent similar vulnerabilities, while software developers must remember the principle that security takes precedence over functionality. A detailed technical analysis of this vulnerability is available in the “ MongoBleed Vulnerability Analysis Report (CVE-2025-14847) – AhnLab TIP ” provided by AhnLab ATIP. Source https://nvd.nist.gov/vuln/detail/CVE-2025-14847 https://github.com/mongodb/mongo/blob/r8.2.2/src/mongo/transport/message_compressor_manager.h https://www.abstract.security/blog/critical-mongodb-vulnerability-cve-2025-14847-mongobleed https://www.akamai.com/blog/security-research/cve-2025-14847-all-you-need-to-know-about-mongobleed https://censys.com/advisory/cve-2025-14847 Gain access to related IOCs and detailed analysis by subscribing to AhnLab TIP . For subscription details, click the banner below.

ASEC MongoDB Product Security Update Advisory (CVE-2025-14847) 2025-12-31

원문 보기

Overview We have released security updates to fix vulnerabilities in MongoDB products. Users of affected products are advised to update to the latest version. Affected Products CVE-2025-14847 MongoDB versions: 8.2.0 and above but below 8.2.3 MongoDB version: 8.0.0 or later and 8.0.16 or earlier MongoDB version: 7.0.0 or later but not earlier than 7.0.26 MongoDB version: 6.0.0 or later but not earlier than 6.0.26 MongoDB version: 5.0.0 or later and 5.0.31 or earlier MongoDB version: 4.4.0 or later and 4.4.29 or earlier MongoDB Server version: 4.2 full version MongoDB Server version: 4.0 full version MongoDB Server version: 3.6 full version Resolved Vulnerabilities Uninitialized heap memory information exposure in an unauthenticated environment due to an error in the zlib implementation in the MongoDB product (CVE-2025-14847) Vulnerability Patches Vulnerability patches have been made available in the latest updates. Please follow the instructions on the Referenced Sites to update to the latest Vulnerability Patches version. CVE-2025-14847 MongoDB version: 8.2.3 MongoDB version: 8.0.17 MongoDB version: 7.0.28 MongoDB version: 6.0.27 MongoDB version: 5.0.32 MongoDB version: 4.4.30 References [1] Make minimally sized buffers for uncompressed Messages https://jira.mongodb.org/browse/SERVER-115508

자동 추천 장비와 근거 참고용

추천할 매핑이 없습니다.

취약점 종류 CWE

영향받는 제품 CPE · 6건
제조사제품영향받는 버전표준 표기CPE
mongodbmongodb 3.6.0 이상 4.4.30 미만 cpe:2.3:a:mongodb:mongodb:*:*:*:*:*:*:*:*
mongodbmongodb 5.0.0 이상 5.0.32 미만 cpe:2.3:a:mongodb:mongodb:*:*:*:*:*:*:*:*
mongodbmongodb 6.0.0 이상 6.0.27 미만 cpe:2.3:a:mongodb:mongodb:*:*:*:*:-:*:*:*
mongodbmongodb 7.0.0 이상 7.0.28 미만 cpe:2.3:a:mongodb:mongodb:*:*:*:*:-:*:*:*
mongodbmongodb 8.0.0 이상 8.0.17 미만 cpe:2.3:a:mongodb:mongodb:*:*:*:*:-:*:*:*
mongodbmongodb 8.2.0 이상 8.2.3 미만 cpe:2.3:a:mongodb:mongodb:*:*:*:*:-:*:*:*
참고 링크 6건
용어 설명 CVE · CVSS · EPSS · KEV · NVD …
CVE 취약점 번호
공개된 보안 취약점마다 붙는 국제 고유 번호입니다. 예: CVE-2021-44228(Log4j). 가운데 숫자는 번호를 받은 해입니다.
CVSS 위험도 점수
취약점이 얼마나 위험한지 0~10점으로 매긴 국제 표준 점수입니다. 심각 9.0 이상 · 높음 7.0~8.9 · 중간 4.0~6.9 · 낮음 0.1~3.9. 공격이 얼마나 쉬운지와 피해 크기로 정하며, 실제로 공격받고 있는지는 반영하지 않습니다.
EPSS 악용 가능성
앞으로 30일 안에 실제 공격에 쓰일 확률을 추정한 값(0~100%)입니다. 국제 보안 단체 FIRST 가 매일 계산합니다. 높을수록 먼저 조치하세요.
KEV 실제 악용 확인
미국 사이버보안청(CISA)이 실제 공격에 쓰인 것을 확인한 취약점만 모은 목록입니다. 여기에 있으면 가장 먼저 조치할 대상입니다. '랜섬웨어' 표시는 랜섬웨어 공격에 쓰인 것으로 알려진 것입니다.
공격 코드 공개된 PoC
NVD 참고 링크 중 '공격 코드(Exploit)' 표시가 붙은 것이 있다는 뜻입니다. 누구나 공격을 시도해 볼 수 있으므로 서두르는 게 좋지만, 실제 악용이 확인된 것(KEV)과는 다릅니다.
NVD 미국 취약점 DB
미국 국립표준기술연구소(NIST)가 운영하는 취약점 데이터베이스입니다. CVE 마다 설명·CVSS 점수·영향받는 제품·취약점 종류를 붙입니다. 이 사이트 설명의 원문 출처입니다.
우선순위 이 사이트의 참고 점수
CVSS·KEV·랜섬웨어·EPSS·ASEC 언급·공격 코드 공개를 합쳐 계산한 점수입니다. 높을수록 먼저 살펴보세요. 공식 점수가 아닙니다.
ASEC 안랩 분석 글
안랩 보안대응센터 블로그입니다. 'ASEC 3' 은 분석 글에 그 CVE 번호가 3번 나왔다는 뜻이며, 국내에서 악용이 확인됐다는 뜻은 아닙니다.
CWE 취약점 종류
취약점 종류의 분류 번호입니다. 예: CWE-89 SQL 인젝션, CWE-79 크로스 사이트 스크립팅.
CPE 영향받는 제품
취약점이 있는 제품과 버전을 적는 표준 표기입니다. 예: apache:tomcat 9.0.0~9.0.80.
KB Microsoft 업데이트 번호
Microsoft 가 업데이트마다 붙이는 번호입니다. 예: KB5068791. '수정된 버전' 은 업데이트 후의 빌드 번호로, 이보다 낮으면 업데이트가 필요합니다.
시나리오 · 번역
'시나리오' 는 단계별 판정 초안이 있다는 표시입니다(없다고 안전한 것은 아닙니다). '(번역)' 은 Claude 로 기계 번역한 설명입니다.