metaタグでSet-Cookieできる(できた)ことを知らなかった。
<meta http-equiv="Set-Cookie" content="sessionid=xxxxx">
metaタグをインジェクト可能な脆弱性が存在すると攻撃者がcookieを設定させることができてしまう。
ただ、現行のHTML Living Standardによると
Set-Cookie state (http-equiv="set-cookie") This pragma is non-conforming and has no effect.
User agents are required to ignore this pragma.
となっているのでユーザエージェントは無視しないといけない。
試してみると以下のようにIE以外は無視しているようだ。
| ブラウザ | バージョン | Set-Cookieできる? |
|---|---|---|
| IE | 11 | o |
| Edge | 97 | x |
| Chrome | 96 | x |
| FireFox | 95 | x |
| Safari | 15 | x |