🇰🇷 한글 설명
Pydantic AI에서 Server-Side Request Forgery (SSRF) 취약점이 발견되었습니다. 이 취약점은 URL 다운로드 기능에서 발생하며, 공격자는 내부 네트워크 리소스에 접근할 수 있습니다.
💡 쉬운 설명
Pydantic AI의 URL 다운로드 기능에 취약점이 있습니다. 공격자는 내부 네트워크 리소스에 접근할 수 있으며, 이는 내부 서비스나 클라우드 자격증명에 대한 접근을 의미할 수 있습니다. 이 취약점은 외부 사용자로부터 메시지 기록을 수신하는 애플리케이션에만 영향을 미칩니다.
🇺🇸 원문 (English)
Pydantic AI is a Python agent framework for building applications and workflows with Generative AI. From 0.0.26 to before 1.56.0, aServer-Side Request Forgery (SSRF) vulnerability exists in Pydantic AI's URL download functionality. When applications accept message history from untrusted sources, attackers can include malicious URLs that cause the server to make HTTP requests to internal network resources, potentially accessing internal services or cloud credentials. This vulnerability only affects applications that accept message history from external users. This vulnerability is fixed in 1.56.0.
📍 영향받는 시스템
Pydantic AI 0.0.26부터 1.56.0 이전 버전
⚔️ 공격 벡터
공격자는 악의적 인 URL을 포함한 메시지 기록을 외부 사용자로부터 수신하는 애플리케이션을 대상으로 공격할 수 있습니다.
🛡️ 대응 방법
Pydantic AI를 1.56.0 이상 버전으로 업데이트하십시오.
🔧 검증 코드
이 코드는 Pydantic AI의 버전을 확인하여 취약점 여부를 점검합니다. Python 3.x와 pkg_resources 모듈이 필요합니다. 코드를 실행하기 전에 Pydantic AI가 설치되어 있는지 확인하십시오.
import pkg_resources
pydantic_ai_version = pkg_resources.get_distribution('pydantic-ai').version
if pkg_resources.parse_version(pydantic_ai_version) < pkg_resources.parse_version('1.56.0'):
print({"result": "취약", "reason": "Pydantic AI 버전이 1.56.0 미만"})
else:
print({"result": "양호", "reason": "Pydantic AI 버전이 1.56.0 이상"})