🇰🇷 한글 설명
curl의 metalink 기능을 사용할 때, 다운로드한 파일의 해시값이 XML 파일에 제공된 값과 일치하지 않더라도 해당 파일을 삭제하지 않고 디스크에 그대로 유지하는 취약점입니다. 이로 인해 공격자가 변조된 파일을 제공할 경우 악성 페이로드가 사용자 시스템에 남을 수 있습니다.
💡 쉬운 설명
파일을 여러 곳에서 나누어 받는 기능을 쓸 때, 파일이 변조되었는지 확인하고 잘못된 파일은 지워야 하는데 이를 하지 못하는 문제입니다. 결과적으로 해커가 만든 가짜 파일이 내 컴퓨터에 그대로 저장될 위험이 있습니다.
🇺🇸 원문 (English)
When curl is instructed to download content using the metalink feature, thecontents is verified against a hash provided in the metalink XML file.The metalink XML file points out to the client how to get the same contentfrom a set of different URLs, potentially hosted by different servers and theclient can then download the file from one or several of them. In a serial orparallel manner.If one of the servers hosting the contents has been breached and the contentsof the specific file on that server is replaced with a modified payload, curlshould detect this when the hash of the file mismatches after a completeddownload. It should remove the contents and instead try getting the contentsfrom another URL. This is not done, and instead such a hash mismatch is onlymentioned in text and the potentially malicious content is kept in the file ondisk.
📍 영향받는 시스템
curl versions prior to 7.76.1
⚔️ 공격 벡터
변조된 콘텐츠를 호스팅하는 서버를 통해 악성 페이로드가 포함된 파일을 다운로드하도록 유도
🛡️ 대응 방법
curl을 7.76.1 버전 이상으로 업데이트
🔧 검증 코드
출력된 버전 번호가 7.76.1 미만이면 해당 취약점에 노출된 상태입니다.
curl --version | grep -E 'curl/[0-9]+\.[0-9]+\.[0-9]+'