Skip to content
KitploitKITPLOIT
도구블로그
제출
도구블로그
제출

해킹, 침투 테스트 및 사이버 보안 도구를 당신의 보안 무기고에!

Kitploit은 해킹, 사이버 보안 및 침투 테스트 도구 디렉토리입니다. 최신 프로젝트 업데이트를 발견하여 취약점을 찾고, 시스템을 분석하고, 테스트를 자동화하고, 보안을 강화하세요.

··피드·문의·개인정보·© 2026 Kitploit

도구 디렉토리

카테고리

모든 카테고리 보기
Loading categories
CVE-2022-44311 — html2xhtml의 Out-Of-Bounds Read : CVE-2022-44311 | Kitploit
도구/GitHubGitHub/desmondsanctity/cve-2022-44311
Memory ForensicsVulnerability AnalysisExploitationFuzzingBinary AnalysisLearning & Education
GitHubdesmondsanctity/cve-2022-44311

CVE-2022-44311

html2xhtml의 Out-Of-Bounds Read : CVE-2022-44311

저장소 보기
253년 전아직 검토되지 않음

인기

모두 보기 →

커뮤니티에서 가장 많이 사용되는 도구를 찾아보세요.

모든 도구 탐색

도구 컬렉션을 둘러보세요

모든 도구 보기 →
공유

Out-Of-Bounds Read in html2xhtml : CVE-2022-44311

요약

Html2xhtml v1.3에서 함수 static void elm_close(tree_node_t *nodo) (procesador.c)에 Out-Of-Bounds 읽기 취약점이 발견되었습니다. 이 취약점을 통해 공격자는 조작된 html 파일을 사용하여 민감한 파일에 접근하거나 서비스 거부(DoS)를 일으킬 수 있습니다.

CWE-125 Out-of-Bounds Read는 메모리에서 데이터를 읽을 때 발생할 수 있는 소프트웨어 오류 유형입니다. 예를 들어 프로그램이 배열의 끝을 넘어 읽으려고 할 때 발생할 수 있습니다. Out-of-bounds 읽기는 충돌이나 기타 예기치 않은 취약점으로 이어질 수 있으며, 공격자가 접근해서는 안 되는 민감한 정보를 읽을 수 있게 할 수 있습니다.

제품

html2xhtml

테스트된 버전

1.3

세부 내용

문제: html2xhtml/src/procesador.c의 Out of Bounds 읽기 (GHSA-28fm-qh2h-3mch)

Html2xhtml은 HTML 파일을 XHTML 파일로 변환하는 명령줄 도구입니다. Html2xhtml은 다음 문서 유형 중 하나를 준수하는 XHTML 출력을 생성할 수 있습니다: XHTML 1.0 (Transitional, Strict 및 Frameset), XHTML 1.1, XHTML Basic 및 XHTML Mobile Profile.

이 취약점은 -t frameset 옵션을 사용할 때 발생하는 세그폴트 오류로 인해 발견되었습니다. 세그멘테이션 폴트 또는 segfault는 자신에게 속하지 않은 메모리에 접근하여 발생하는 특정 종류의 오류입니다. 이는 메모리 손상을 막고 디버깅하기 어려운 메모리 버그를 방지하는 도우미 메커니즘입니다.

Valgrind(C 및 C++ 프로그램에서 힙 메모리(동적으로 new 또는 malloc으로 할당된 메모리)에 대한 메모리 접근 오류를 찾는 도구)를 사용하여 세그폴트 오류를 디버깅한 결과 테스트 케이스에서 invalid read of size 4가 보고되었습니다:

root@kitploit:~
==1040381== Memcheck, a memory error detector
==1040381== Copyright (C) 2002-2017, and GNU GPL'd, by Julian Seward et al.
==1040381== Using Valgrind-3.18.1 and LibVEX; rerun with -h for copyright info
==1040381== Command: ./src/html2xhtml -t frameset report/vuln/id:000000,sig:11,src:001386+001369,time:12081510,execs:2336913,op:splice,rep:16
==1040381== 
==1040381== Invalid read of size 4
==1040381==    at 0x40E911: elm_close (procesador.c:944)
==1040381==    by 0x410617: err_html_struct (procesador.c:1889)
==1040381==    by 0x40F20A: err_content_invalid (procesador.c:0)
==1040381==    by 0x40F20A: elm_close (procesador.c:959)
==1040381==    by 0x40E7C4: saxEndDocument (procesador.c:233)
==1040381==    by 0x40DF7A: main (html2xhtml.c:117)
==1040381==  Address 0x6f20d4 is not stack'd, malloc'd or (recently) free'd
==1040381== 
==1040381== 
==1040381== Process terminating with default action of signal 11 (SIGSEGV)
==1040381==  Access not within mapped region at address 0x6F20D4
==1040381==    at 0x40E911: elm_close (procesador.c:944)
==1040381==    by 0x410617: err_html_struct (procesador.c:1889)
==1040381==    by 0x40F20A: err_content_invalid (procesador.c:0)
==1040381==    by 0x40F20A: elm_close (procesador.c:959)
==1040381==    by 0x40E7C4: saxEndDocument (procesador.c:233)
==1040381==    by 0x40DF7A: main (html2xhtml.c:117)
==1040381==  If you believe this happened as a result of a stack
==1040381==  overflow in your program's main thread (unlikely but
==1040381==  possible), you can try to increase the size of the
==1040381==  main thread stack using the --main-stacksize= flag.
==1040381==  The main thread stack size used in this run was 8388608.
==1040381== 
==1040381== HEAP SUMMARY:
==1040381==     in use at exit: 88,190 bytes in 13 blocks
==1040381==   total heap usage: 22 allocs, 9 frees, 2,218,413 bytes allocated
==1040381== 
==1040381== LEAK SUMMARY:
==1040381==    definitely lost: 0 bytes in 0 blocks
==1040381==    indirectly lost: 0 bytes in 0 blocks
==1040381==      possibly lost: 0 bytes in 0 blocks
==1040381==    still reachable: 88,190 bytes in 13 blocks
==1040381==         suppressed: 0 bytes in 0 blocks
==1040381== Rerun with --leak-check=full to see details of leaked memory
==1040381== 
==1040381== For lists of detected and suppressed errors, rerun with: -s
==1040381== ERROR SUMMARY: 1 errors from 1 contexts (suppressed: 0 from 0)
==1040419== Memcheck, a memory error detector

Valgrind의 오류 로그를 통해 세그폴트가 발생한 다음 함수를 찾을 수 있었습니다:

https://github.com/jfisteus/html2xhtml/blob/ffb2f1f12910eb5945413e0bdb9272b508241aa1/src/procesador.c#L940

image

함수에 타입 검사가 누락된 것으로 확인되었습니다. 사용자가 element 대신 comment 타입의 노드를 함수에 전달하여 out of bound 읽기 오류가 발생했습니다. 사용자는 ELM_PTR(nodo).contenttype[doctype]이 유효하지 않은 잘못된 형식의 문서를 제공할 수 있으며, 이로 인해 어셈블리에서 다음과 같은 비교가 발생합니다:

root@kitploit:~
cmp    dword ptr [rbp + rax*4 + 0xc], 4

공격자는 이 취약점을 활용하여 조작된 파일을 통해 민감한 파일, 메모리 또는 위치를 읽을 수 있습니다.

영향

  • 공격자는 이 문제를 이용하여 민감한 메모리, 위치 또는 파일을 읽을 수 있습니다.
  • 공격자는 조작된 html 파일을 통해 서비스 거부(DoS) 공격을 일으킬 수도 있습니다.

패치

  • 이 취약점은 패키지된 버전의 소프트웨어를 사용하는 모든 사용자에게 영향을 미칩니다. GitHub 저장소의 master 브랜치에 이 커밋과 관련된 수정 사항이 있습니다.
  • 사용자는 2022년 10월 25일 이후의 최신 업데이트를 가져와 자신의 시스템에서 컴파일할 것을 권장합니다. 버그 수정 이후 새로운 릴리스나 버전은 없습니다.

참고자료

  • https://nvd.nist.gov/vuln/detail/CVE-2022-44311
  • jfisteus/html2xhtml#19
  • https://securityboulevard.com/2022/06/what-is-an-out-of-bounds-read-and-out-of-bounds-write-error/
  • https://cwe.mitre.org/data/definitions/125.html

CVSS 기본 지표

CVE

  • CVE-2022-44311

크레딧

  • 이 문제는 @Halcy0nic이 html2xhtml 소프트웨어 저장소에 이슈로 발견 및 보고했습니다.
도구 다운로드
심각도높음 8.1 / 10
공격 복잡성낮음
필요한 권한없음
사용자 상호작용필요
범위변경되지 않음
기밀성높음
무결성없음
가용성높음