| タイトル | jekyll jekyll-admin 0.1.1 Improper Neutralization of Alternate XSS Syntax |
|---|
| 説明 | Summary:
Jekyll Manager (jekyll-admin) 0.1.1 allows unauthenticated attackers to inject arbitrary JavaScript into generated site pages by submitting raw HTML in the raw_content field of the pages REST API. The content is written to disk without sanitization; per the CommonMark specification, raw HTML blocks pass through unchanged to the rendered output. Confirmed live: <script>alert(document.domain)</script> was present unescaped in GET /xss-poc.html after a single unauthenticated PUT request.
Vulnerable component:
REST API endpoints: PUT /_api/pages/:path, PUT /_api/drafts/:path, PUT /_api/data/:path
Implemented in: lib/jekyll-admin/server/page.rb
Affected files and parameters:
File: lib/jekyll-admin/server/page.rb
Parameter: raw_content (JSON body field — written verbatim to the Markdown file on disk)
The put handler calls write_file(write_path, page_body) with no authentication check and no HTML sanitization.
Technical description:
The page write handler writes request_payload['raw_content'] directly to a Markdown file on disk. Jekyll processes this Markdown using CommonMark (or Kramdown), which per the CommonMark specification (Section 4.6 — HTML blocks) passes raw HTML block elements through unchanged into the generated HTML output. A <script> tag or event handler placed at the start of a line is treated as a raw HTML block and appears verbatim in the rendered page. No input sanitization is applied at write time, and no output encoding is applied at render time.
Steps to reproduce:
1. Start jekyll-admin 0.1.1 locally (default port 4000, no authentication configured).
2. Send HTTP PUT to /_api/pages/xss-poc.md with body {"front_matter":{},"raw_content":"<script>alert(document.domain)</script>"}.
3. Server responds with HTTP 200 OK. No credentials were required.
4. Send GET /xss-poc.html to the Jekyll-generated site.
5. Response body contains <script>alert(document.domain)</script> unescaped.
Impact:
An unauthenticated attacker can permanently inject JavaScript into any page of the Jekyll site. The payload persists on disk and executes in every visitor's browser when they load the affected page. This enables cookie theft, session hijacking, keylogging, phishing content injection, and defacement. The attack can be repeated for any number of pages with separate PUT requests, affecting any page URL the attacker chooses. |
|---|
| ソース | ⚠️ https://github.com/jekyll/jekyll-admin/issues/732 |
|---|
| ユーザー | vinniboy021 (UID 100165) |
|---|
| 送信 | 2026年11月09日 18:05 (25 日 ago) |
|---|
| モデレーション | 2026年12月04日 07:56 (25 days later) |
|---|
| ステータス | 承諾済み |
|---|
| VulDBエントリ | 449616 [jekyll jekyll-admin 迄 0.12.0 REST API page.rb raw_content クロスサイトスクリプティング] |
|---|
| ポイント | 20 |
|---|