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
| Item | Details |
|---|---|
| CVE | CVE-2026-46547 |
| Advisory | GHSA-9qgr-6vpg-9gh9 |
| Project | nocodb (npm) |
| Severity | Medium — CVSS 3.1 score 6.1 (AV:N/AC:L/PR:N/UI:R/S:C/C:L/I:L/A:N) |
| Weakness | CWE-79: Cross-site Scripting |
| Affected | Versions before 2026.04.1 (NocoDB’s advisory) |
| Fixed | 2026.04.1 |
| Credit | naoyashiga (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).
- When the URL was not on the same origin, the page assigned the raw value to
window.location.href. A check calledisSameOriginUrl()decided this, and it returnsfalseforjavascript:URLs, so such a URL took this path and ran as script. - The redirect URL was also put directly into the
hrefattribute of an<a>tag.
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)
- 2026-03-07 — Security advisory opened in the NocoDB repository, and the fix committed
- 2026-04-15 — NocoDB 2026.04.1 released
- 2026-05-19 — Advisory published by NocoDB
- 2026-05-21 — Added to the GitHub Advisory Database as CVE-2026-46547
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
References
- GitHub Advisory Database: GHSA-9qgr-6vpg-9gh9
- NocoDB security advisory
- NVD: CVE-2026-46547
- Fix commit
概要(日本語)
NocoDB は、無料でセルフホストできる Airtable の代替サービスです。NocoDB は外部リンクを開く前に、サイトから離れることを知らせる警告ページを表示します。このページは、移動先の URL と戻り先の URL をクエリ文字列からそのまま受け取り、検証していませんでした。そのため、javascript: で始まる URL がスクリプトとして実行される状態でした。この反射型クロスサイトスクリプティング(XSS)はログイン不要で、細工したリンクを相手に送るだけで成立します。この問題は CVE-2026-46547(深刻度 Medium、CVSS 6.1)として登録され、NocoDB 2026.04.1 で修正されました。
基本情報
| 項目 | 内容 |
|---|---|
| CVE | CVE-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で脆弱性を見つける方法。