Skip to content
Naoya Tech
Go back

CVE-2026-46547: Reflected XSS via the Redirect URL on NocoDB's Page Leaving Warning

Edit page

Summary

NocoDB is a free, self-hostable alternative to Airtable. Before NocoDB opens an external link, it shows a page warning you that you are leaving the site. I found that this page took the destination URL and the back URL straight from the query string without validating them. A javascript: URL therefore ran as script. This reflected cross-site scripting (XSS) needed no login: sending someone a crafted link was enough. The issue was assigned CVE-2026-46547, rated Medium (CVSS 6.1), and fixed in NocoDB 2026.04.1.

At a Glance

ItemDetails
CVECVE-2026-46547
AdvisoryGHSA-9qgr-6vpg-9gh9
Projectnocodb (npm)
SeverityMedium — CVSS 3.1 score 6.1 (AV:N/AC:L/PR:N/UI:R/S:C/C:L/I:L/A:N)
WeaknessCWE-79: Cross-site Scripting
AffectedVersions before 2026.04.1 (NocoDB’s advisory)
Fixed2026.04.1
Creditnaoyashiga (reporter)

The GitHub Advisory Database entry lists the affected npm versions as up to 0.301.3, with no patched version. NocoDB’s own advisory lists the fix as 2026.04.1.

What Was Wrong

The warning page, PageLeavingWarning.vue, read two query parameters without validating them: ncRedirectUrl (where to go) and ncBackUrl (where to go back to).

As a result, a link to the warning page whose parameter held a javascript: URL ran arbitrary JavaScript in the victim’s browser.

Impact

An attacker could run arbitrary JavaScript in the context of the NocoDB application by sending a victim a crafted link. No authentication was required.

The Fix

The fix validates both parameters in PageLeavingWarning.vue. A URL that has a scheme is accepted only if it is http:// or https://. The back URL must also be on the same origin. Any other value is discarded, so javascript: URLs no longer reach window.location.href or the link. Update NocoDB to 2026.04.1 or later.

Timeline (UTC)

How I Found It

This was my third CVE. In this video I explain how I used AI to narrow down where to look, and how I then verified the finding myself.

A Third CVE: Finding an XSS in NocoDB with AI Video · 18:18

References

概要(日本語)

NocoDB は、無料でセルフホストできる Airtable の代替サービスです。NocoDB は外部リンクを開く前に、サイトから離れることを知らせる警告ページを表示します。このページは、移動先の URL と戻り先の URL をクエリ文字列からそのまま受け取り、検証していませんでした。そのため、javascript: で始まる URL がスクリプトとして実行される状態でした。この反射型クロスサイトスクリプティング(XSS)はログイン不要で、細工したリンクを相手に送るだけで成立します。この問題は CVE-2026-46547(深刻度 Medium、CVSS 6.1)として登録され、NocoDB 2026.04.1 で修正されました。

基本情報

項目内容
CVECVE-2026-46547
アドバイザリGHSA-9qgr-6vpg-9gh9
プロジェクトnocodb(npm)
深刻度Medium(CVSS 3.1 スコア 6.1、AV:N/AC:L/PR:N/UI:R/S:C/C:L/I:L/A:N)
脆弱性の種類CWE-79: クロスサイトスクリプティング
影響バージョン2026.04.1 より前のバージョン(NocoDB のアドバイザリによる)
修正バージョン2026.04.1
クレジットnaoyashiga(報告者)

GitHub Advisory Database では、影響を受ける npm のバージョンが 0.301.3 以下とされ、修正バージョンは記載されていません。NocoDB 自身のアドバイザリでは、修正バージョンは 2026.04.1 とされています。

何が問題だったか

警告ページの PageLeavingWarning.vue は、ncRedirectUrl(移動先)と ncBackUrl(戻り先)という2つのクエリパラメータを検証せずに読み込んでいました。

  • URL が同じオリジンでない場合、ページはその値をそのまま window.location.href に代入していました。この判定は isSameOriginUrl() で行われ、javascript: の URL に対しては false を返します。そのため、こうした URL はこちらの処理に進み、スクリプトとして実行されました。
  • 移動先の URL は、<a> タグの href 属性にもそのまま入れられていました。

その結果、パラメータに javascript: の URL を入れた警告ページへのリンクを開くと、被害者のブラウザで任意の JavaScript が実行されました。

影響

攻撃者は、細工したリンクを被害者に送るだけで、NocoDB アプリケーションのコンテキストで任意の JavaScript を実行できました。認証は不要でした。

修正内容

修正では、PageLeavingWarning.vue で2つのパラメータを検証するようになりました。スキームを含む URL は、http:// か https:// の場合だけ受け付けます。戻り先の URL は、さらに同じオリジンであることも求められます。それ以外の値は捨てられるため、javascript: の URL が window.location.href やリンクに渡ることはなくなりました。NocoDB を 2026.04.1 以降に更新してください。

タイムライン(UTC)

  • 2026-03-07 — NocoDB のリポジトリでセキュリティアドバイザリを作成、同日に修正をコミット
  • 2026-04-15 — NocoDB 2026.04.1 リリース
  • 2026-05-19 — NocoDB がアドバイザリを公開
  • 2026-05-21 — GitHub Advisory Database に CVE-2026-46547 として登録

見つけ方

これは私にとって3件目の CVE です。AI を使って調べる場所を絞り込み、見つかった問題を自分で検証するまでの流れを、この動画で解説しています。

【セキュリティ】3つ目のCVEを取得しました。AIで脆弱性を見つける方法。 動画 · 18:18

参考リンク


Edit page
Share this post on:

Next Post
CVE-2026-27822: Critical Stored XSS in the RustFS Console Leading to Admin Account Takeover