🔍 CVE-2026-72848

8.6
CVSS Score
HIGH
2026-08-20
2026-10-18 20:10
✅ 완료

🇰🇷 한글 설명

langchain_community의 SitemapLoader.parse_sitemap 함수가 중첩된 사이트맵 요소를 처리할 때 도메인 제한 설정을 제대로 적용하지 않는 취약점이 발견되었습니다. 공격자가 조작된 사이트맵을 제공하면 restrict_to_same_domain 설정이 활성화되어 있더라도 서버가 내부 네트워크 주소로 요청을 보내게 하여 내부 데이터를 탈취할 수 있습니다.

💡 쉬운 설명

사이트맵을 읽어오는 기능이 외부 사이트만 확인해야 한다는 규칙을 일부 무시하여, 공격자가 서버 내부의 비밀 정보가 담긴 주소를 가리키도록 속일 수 있습니다. 이로 인해 서버가 공격자가 원하는 내부 정보를 대신 읽어서 보여주는 문제가 발생합니다.

🇺🇸 원문 (English)

SitemapLoader.parse_sitemap in langchain_community/document_loaders/sitemap.py applies the documented restrict_to_same_domain control only to leaf url entries. The loop over url elements filters cross-domain locations, but the loop over nested sitemap elements passes the child loc straight to self.scrape_all([loc.text], "xml"), which reaches WebBaseLoader.scrape_all and an aiohttp GET, with no domain comparison and no check for private, loopback or link-local destinations. An attacker who controls or influences an ingested sitemap can therefore point a nested sitemap entry at an internal address and make the server fetch it even when the deploying application set restrict_to_same_domain to True specifically to confine outbound requests. The fetched content is parsed and surfaces in the returned Documents, so internal responses are disclosed to the caller rather than merely requested.

📍 영향받는 시스템

langchain_community (SitemapLoader 사용 시)

⚔️ 공격 벡터

조작된 중첩 사이트맵(Nested Sitemap) 내의 loc 태그에 내부 네트워크 또는 루프백 주소를 삽입하여 SSRF 유도

🛡️ 대응 방법

langchain_community 라이브러리를 최신 버전으로 업데이트하거나, 사이트맵 입력 데이터에 대한 엄격한 도메인 검증 로직을 추가해야 합니다.

🔧 검증 코드

출력된 버전이 취약점이 해결된 최신 버전인지 확인합니다.

Shell / Script
pip show langchain-community | grep Version

📊 CVSS Vector String

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

💻 영향받는 소프트웨어

IBM WebSphere Application Server