🇰🇷 한글 설명
Nokogiri는 Ruby용 XML 및 HTML 오픈소스 라이브러리입니다. 1.19.4 이전 버전에서는 XML 속성 값을 교체할 때 Ruby 래퍼가 해제된 메모리를 가리킬 수 있습니다. 이로 인해 잘못된 메모리 읽기와 세그멘테이션 폴트가 발생할 수 있습니다.
💡 쉬운 설명
XML 파싱 라이브러리 Nokogiri에서 메모리를 잘못 다루는 결함이 발견되었습니다. 이 결함으로 프로그램이 비정상 종료되거나 메모리 정보가 잘못 읽힐 수 있습니다.
🇺🇸 원문 (English)
Nokogiri is an open source XML and HTML library for the Ruby programming language. Prior to 1.19.4, Nokogiri’s CRuby native extension could leave a Ruby wrapper pointing to freed memory when replacing the value of an XML attribute. If Ruby code had already accessed an attribute child node, Nokogiri::XML::Attr#value= could free the underlying native child node while the wrapper remained reachable through the document node cache. A later use of the freed child node or a Ruby GC mark could dereference an invalid pointer, causing an invalid read and a possible segfault. This vulnerability is fixed in 1.19.4.
📍 영향받는 시스템
Nokogiri 1.19.4 미만 버전을 사용하는 Ruby 애플리케이션 (CRuby 네이티브 확장 사용 환경)
⚔️ 공격 벡터
조작된 XML 문서를 처리하는 Ruby 애플리케이션에서 속성 값 교체 과정을 유발하여 해제된 메모리 접근을 일으킴
🛡️ 대응 방법
Nokogiri를 1.19.4 이상으로 업데이트 (gem update nokogiri 또는 Gemfile 버전 지정)
🔧 검증 코드
출력된 버전이 1.19.4 미만이면 취약하므로 업데이트가 필요하고, 1.19.4 이상이면 패치된 상태입니다.
gem list nokogiri 2>/dev/null | grep nokogiri