<?xml version="1.0" encoding="utf-8" standalone="yes"?>
<oembed>
  <author_name>ThisIsOne</author_name>
  <author_url>https://blog.hatena.ne.jp/ThisIsOne/</author_url>
  <blog_title>Shikata Ga Nai</blog_title>
  <blog_url>https://cysec148.hatenablog.com/</blog_url>
  <categories>
    <anon>Web Security Academy</anon>
    <anon>XSS</anon>
  </categories>
  <description>Hello there, ('ω')ノ ねらい このLABは、商品ページの在庫チェッカーで使われているJavaScriptが、URLのlocation.search（クエリ文字列）から値を取り出し、そのままdocument.writeで＜select&gt;配下に書き込む、という危険な実装になっている点を突きます。攻撃者はstoreIdというURLパラメータを細工してselect要素から脱出し、任意のHTML要素＋イベントハンドラを挿入することでalert(1)を実行します。 全体像（まずはストーリー） 商品ページのURLにstoreIdを付与すると、その値が＜select&gt;の＜option&gt;として…</description>
  <height>190</height>
  <html>&lt;iframe src=&quot;https://hatenablog-parts.com/embed?url=https%3A%2F%2Fcysec148.hatenablog.com%2Fentry%2F2025%2F08%2F15%2F215316&quot; title=&quot;【有料試作版】PortSwigger LAB解説：DOM XSS in document.write sink using source location.search（select要素内のdocument.writeを悪用） - Shikata Ga Nai&quot; class=&quot;embed-card embed-blogcard&quot; scrolling=&quot;no&quot; frameborder=&quot;0&quot; style=&quot;display: block; width: 100%; height: 190px; max-width: 500px; margin: 10px 0px;&quot;&gt;&lt;/iframe&gt;</html>
  <image_url></image_url>
  <provider_name>Hatena Blog</provider_name>
  <provider_url>https://hatena.blog</provider_url>
  <published>2025-08-15 21:53:16</published>
  <title>【有料試作版】PortSwigger LAB解説：DOM XSS in document.write sink using source location.search（select要素内のdocument.writeを悪用）</title>
  <type>rich</type>
  <url>https://cysec148.hatenablog.com/entry/2025/08/15/215316</url>
  <version>1.0</version>
  <width>100%</width>
</oembed>
