Unrestricted File Upload in kiwitcms (CVE-2023-33977)
Summary
vulnerability in kiwitcms (CVE-2023-33977). Confidential information can be exposed externally. Exploitable via ``proxy_pass``. Mitigation: upgrade to `12.4` or later.
AI summary snake-internal / snake-material-v2
Response Actions (7 steps)
Concrete steps and command examples for SOC/SRE teams to execute in order
-
1Identify exposure identify
grep -r 'kiwitcms' . | grep -v node_modulesリポジトリと本番環境の依存ファイル (package-lock.json / requirements.txt / go.sum / Gemfile.lock 等) で `kiwitcms` を grep し、稼働しているサービス・バージョンを把握する。
-
5Apply temporary workaround mitigate
If serving Kiwi TCMS behind a reverse proxy make sure that additional header values are still passed to the client browser.パッチが適用されるまでの応急処置として、If serving Kiwi TCMS behind a reverse proxy make sure that additional header values are still passed to the client browser. を実施。回避策の副作用 (機能低下) を確認した上で。
-
6Apply patch patch
Upgrade kiwitcms to 12.4ステージング環境で 12.4 に上げて回帰テスト → 本番反映。回帰テストはアプリの主要ハッピーパスと、Step 3 で見つけた異常検知の続報チェックを含めること。
-
7Post-deployment verification verify
Confirm patched version is live in productionパッチ適用後、ステージングで PoC または同等の悪用パターンを再現して脆弱性が閉じたことを確認。本番では Step 3 と同じログクエリでアラート再発が無いか継続監視。
Affected packages
References
- advisory https://nvd.nist.gov/vuln/detail/CVE-2023-33977
- advisory https://github.com/advisories/GHSA-2fqm-m4r2-fh98
- package https://github.com/kiwitcms/Kiwi
- package https://pypi.org/project/kiwitcms
- web https://github.com/kiwitcms/Kiwi/security/advisories/GHSA-2fqm-m4r2-fh98
- web https://github.com/kiwitcms/kiwi/commit/d789f4b51025de4f8c747c037d02e1b0da80b034
- web https://github.com/kiwitcms/Kiwi/blob/master/etc/nginx.conf#L66-L68
- web https://github.com/kiwitcms/Kiwi/blob/master/etc/nginx.conf#L87
- web https://huntr.dev/bounties/6aea9a26-e29a-467b-aa5a-f767f0c2ec96
- web https://kiwitcms.org/blog/kiwi-tcms-team/2023/06/06/kiwi-tcms-124