HTTP セキュリティ ヘッダー - HTTPS サーバーに存在しない HTTP Strict Transport Security (HSTS) (RFC 6797)
9168
Created On 03/17/23 14:18 PM - Last Modified 02/02/24 06:02 AM
Symptom
- PAN-OS 10.2.x のペンテスト スキャン中に、HTTP セキュリティ ヘッダーが見つからないと報告されます。
- これはcurlコマンドで確認できます。
test-host-> curl -I -k https://w.x.y.z
HTTP/1.1 302 Found
Date: Fri, 17 Mar 2023 13:53:28 GMT
Content-Type: text/html; charset=UTF-8
Connection: keep-alive
Set-Cookie: PHPSESSID=d90l0umcr2s5b74jkvc12l0orr; path=/; secure; HttpOnly
Expires: Thu, 19 Nov 1981 08:52:00 GMT
Cache-Control: no-store, no-cache, must-revalidate
Pragma: no-cache
Location: /php/login.php?
Allow: GET, HEAD, POST, PUT, DELETE, OPTIONS
- 上記のヘッダー出力には "Strict-Transport-Security" は表示されませんが、HTTP 302 Found でページを /php /login.php にリダイレクトします。
- リダイレクトされたページ/ php/loginphpのヘッダを確認すると、以下のようにセキュリティヘッダ「Strict-Transport-Security: max-age=31536000」が表示されます。
test-host-> curl -I -k https://w.x.y.z/php/login.php
HTTP/1.1 200 OK
Date: Fri, 17 Mar 2023 13:53:54 GMT
Content-Type: text/html; charset=UTF-8
Connection: keep-alive
Cache-Control: no-store, no-cache, must-revalidate
Content-Security-Policy: default-src 'self'; script-src 'self' 'unsafe-eval' 'unsafe-inline'; style-src 'self' 'unsafe-inline'; img-src 'self' data:; frame-ancestors 'self'
Strict-Transport-Security: max-age=31536000 <<<<-----
X-Content-Type-Options: nosniff
X-Frame-Options: DENY
X-XSS-Protection: 1; mode=block
Expires: Thu, 19 Nov 1981 08:52:00 GMT
Pragma: no-cache
Set-Cookie: PHPSESSID=6jp2219a8dfev8djdulc4eqats; path=/; secure; HttpOnly; SameSite=strict
Set-Cookie: PHPSESSID=6jp2219a8dfev8djdulc4eqats; path=/; secure; HttpOnly; SameSite=strict
Allow: GET, HEAD, POST, PUT, DELETE, OPTIONSEnvironment
- パロアルトのファイアウォール
- PanOSの10.2.x
- 管理インターフェイス
- HTTPS
Cause
管理インターフェイスのルート URL に、ベース URL の次のセキュリティ ヘッダーがありません。
Strict-Transport-Security: max-age=31536000Resolution
- ルート URL は、「Strict-Transport-Security」ヘッダーを持つログイン ページに 302 リダイレクトします。
- リダイレクトされたページには「Strict-Transport-Security」があるため、脆弱性やリスクはありません。
- この問題は、PAN-OS 10.2.4 /11.0.0 リリース以降で対処されています。
Additional Information
8.0.18、8.1.9、9.0.4、および 9.1.5 の 10.1 では問題になりません。