🇰🇷 한글 설명
@langchain/langgraph-checkpoint-mongodb 1.3.0 이하 버전에서 NoSQL 인젝션 취약점이 발견되었습니다. 공격자가 thread_id 등의 식별자에 MongoDB 연산자를 포함한 객체를 전달할 경우, 데이터베이스 쿼리가 조작되어 다른 사용자의 체크포인트 데이터가 유출될 수 있습니다.
💡 쉬운 설명
데이터를 찾을 때 사용하는 이름표 자리에 특수 명령어를 몰래 넣어 다른 사람의 정보를 훔쳐보는 공격입니다. 이를 통해 원래는 볼 수 없는 다른 사용자의 기록이나 저장된 데이터가 노출될 수 있습니다.
🇺🇸 원문 (English)
@langchain/langgraph-checkpoint-mongodb provides a LangGraph.js CheckpointSaver implementation that uses MongoDB for storage. Versions 1.3.0 and below are vulnerable to NoSQL injection: checkpoint identifiers (thread_id, checkpoint_ns, checkpoint_id) from config.configurable are passed into MongoDB find() queries in MongoDBSaver.getTuple() without type enforcement. If an attacker supplies an object payload (such as MongoDB operators $gt or $ne) instead of a string, it can be interpreted as a query operator, bypassing thread scoping and leaking checkpoints, including pending writes, across tenants. Applications are at risk if they forward untrusted input into config.configurable without coercing it to strings or validating it against a schema, particularly in multi-tenant or user-isolated setups. Apps that only use server-issued, string-typed identifiers with schema validation rejecting non-string fields are not affected. This issue has been fixed in version 1.3.1.
📍 영향받는 시스템
@langchain/langgraph-checkpoint-mongodb 1.3.0 및 그 이하 버전
⚔️ 공격 벡터
config.configurable 내의 식별자(thread_id 등)에 문자열 대신 MongoDB 연산자($gt, $ne 등)가 포함된 객체를 주입
🛡️ 대응 방법
해당 패키지를 취약점이 해결된 버전인 1.3.1 이상으로 업데이트하거나, 입력값을 반드시 문자열로 강제 변환 및 스키마 검증을 수행해야 합니다.
🔧 검증 코드
출력된 결과에서 버전이 1.3.1 미만(예: 1.3.0)인지 확인하여 취약 여부를 판단합니다.
npm list @langchain/langgraph-checkpoint-mongodb
📊 CVSS Vector String
CVSS:3.1/AV:A/AC:L/PR:L/UI:R/S:U/C:H/I:H/A:N
💻 영향받는 소프트웨어
IBM WebSphere Application Server