GHSA-9c5c-9qcx-q35q: @nestjs/platform-fastify: Path-scoped middleware bypass via absolute-form request targets
Noroxi değerlendirmesi
Öncelik: İzleyin (aksiyon skoru 29/100)
- İzlediğimiz kaynaklarda (CISA KEV, Exploit-DB, Metasploit, Nuclei, GitHub) herkese açık istismar kodu ya da sahada sömürü kaydı yok.
- İnternetten erişebilen herkes tetikleyebilir. Hesap ya da parola gerekmez. Kullanıcının bir şey yapması gerekmez. Zamanlama ya da yapılandırma gibi özel koşullar gerekir.
- Düzeltilmiş sürüm: @nestjs/platform-fastify (npm) 12.0.2, 11.2.4.
Şimdilik düşük öncelik. @nestjs/platform-fastify (npm) 12.0.2, 11.2.4 ya da daha yeni sürüme yükseltin.
Kaydın verisinden otomatik üretilir: CVSS (NVD ve CNA), CISA KEV ve SSVC, FIRST EPSS, istismar kaynakları, düzeltme sürümleri. Nasıl hesaplıyoruz
Birincil kaynaklar: OSV
| Field | Value | | --- | --- | | Ecosystem | npm | | Package | `@nestjs/platform-fastify` | | Affected versions | `>= 12.0.0, < 12.0.2` and `< 11.2.4` | | Patched versions | `12.0.2` and `11.2.4` (upgrade to `12.0.3` / `11.2.5`) | ### Summary On the Fastify adapter, an HTTP request that uses an **absolute-form request target** (`GET http://host/path HTTP/1.1` instead of `GET /path HTTP/1.1`) reaches the route handler without running the path-scoped Nest middleware bound to that route. Applications that enforce authentication or authorization in middleware execute the protected handler with those checks skipped. ### Impact Any application that - uses `@nestjs/platform-fastify`, and - binds middleware to specific paths via `MiddlewareConsumer.forRoutes(...)` or `.exclude(...)`, and - is reachable by a client that controls the raw request line. Node's HTTP server accepts absolute-form targets, so no special server configuration is needed. Exposure is reduced when a reverse proxy in front of the application rewrites the request target to origin-form, which most do. Where the bypassed middleware performs authentication or authorization, the result is an authentication or authorization bypass. Where it performs logging, rate limiting or body handling, those are silently skipped instead. ### Details Fastify's router (`find-my-way`) resolves an absolute-form target to its path before matching, so the route handler is dispatched normally. Two places on the middleware side matched against the **raw** request target instead: 1. The bundled copy of the `@fastify/middie` engine at `packages/platform-fastify/adapters/middie/fastify-middie.ts`. NestJS carried this fork to apply an earlier path-decoding fix and it did not track the upstream absolute-form fix released in `@fastify/middie@9.3.4`. 2. `FastifyAdapter`'s own re-check in `createMiddlewareFactory()`, which tests the middleware path regexp against `req.originalUrl`. Both normalized and percent-decoded the target, but neither resolved absolute-form to a path, so the router and the middleware layer disagreed about which path was being requested. A second, related defect contributed. Because the adapter always passes `routerOptions` (to install the version constraint), Fastify did not reflect the deprecated **top-level** router options (`ignoreTrailingSlash`, `ignoreDuplicateSlashes`, `caseSensitive`, `useSemicolonDelimiter`) in `initialConfig.routerOptions`, which is what the middleware engine reads. Applications passing those options at the top level had middleware normalize paths differently from the router, which widened the mismatch. ### Proof of concept ```ts @Controller('users') export class UsersController { @Get() findAll() { return 'protected data'; } } @Module({ controllers: [UsersController] }) export class AppModule implements NestModule { configure(consumer: MiddlewareConsumer) { consumer .apply((req, res) => res.end('blocked by auth middleware')) .forRoutes({ path: 'users', method: RequestMethod.GET }); } } ``` `supertest` and `light-my-request` always emit origin-form targets, so the request has to be written to the socket: ```js const { connect } = require('node:net'); const socket = connect(3000, '127.0.0.1', () => { socket.write( 'GET http://127.0.0.1:3000/users HTTP/1.1\r\n' + 'Host: 127.0.0.1:3000\r\n' + 'Connection: close\r\n\r\n', ); }); socket.pipe(process.stdout); ``` Observed on an affected version: `protected data` — the middleware did not run. Expected, and observed on a patched version: `blocked by auth middleware`. ### Patches Fixed in **12.0.2** and **11.2.4**. Upgrading to **12.0.3** or **11.2.5** is recommended. - The bundled `@fastify/middie` fork was removed and the package now depends on `@fastify/middie@9.3.4`, which resolves absolute-form targets before matching. - The adapter resolves absolute-form targets in its own route check, mirroring `find-my-way`. - Deprecated top-level Fastify router options are folded into `routerOptions` so the middleware engine and the router normalize paths identically. ### Workarounds If you cannot upgrade, reject non-origin-form request targets before middleware runs. Register the hook on the Fastify instance **before the application is initialized**, so that it runs ahead of the middleware engine's own `onRequest` hook, and confirm with the request above that the rejection takes effect: ```ts const adapter = new FastifyAdapter(); adapter.getInstance().addHook('onRequest', (request, reply, done) => { const target = request.raw.url ?? ''; // "*" is the legitimate request target of "OPTIONS * HTTP/1.1" if (target[0] !== '/' && target !== '*') { reply.code(400).send(); return; } done(); }); ``` Rejecting or normalizing absolute-form targets at a reverse proxy in front of the application is equally effective. ### Credit Reported by ZeroVuln Labs.
- Yayın
- 30 Eyl 2026
- Güncelleme
- 30 Eyl 2026
- EPSS
- —
- CWE
- CWE-288
Rapor araçları
Aksiyon skoru
29
Şimdilik düşük öncelik.
- CVSS
- 29 / 40 · 7.4 / 10
- CISA KEV
- 0 / 30 · Listede değil
- EPSS
- 0 / 30 · —
Bu kayıt değişirse haber alın
- KEV'de değil: sahada sömürü kaydı yok
- Herkese açık istismar kodu kaydı yok
- Düzeltme yayımlandı
Bunlardan biri değişirse günlük e-posta özetinde haber veririz.
Sürümünüz etkileniyor mu? Kontrol edinNoroxi analizi
Sizin ortamınızda ne anlama geliyor?
Yukarıdaki değerlendirme kaydın verisinden otomatik üretilir; ortamınızı bilmez. Bu açığın sizde gerçekten sömürülebilir olup olmadığını ve hangi önlemin yeteceğini ekibimiz sizin sistemlerinizde doğrular.
Bu ürünü kullanıyoruz, yardım isteyinEtkilenen sistemler
Sürümünüz etkileniyor mu?
Ürünü seçip kullandığınız sürümü yazın. Bu kaydın sürüm aralıklarıyla tarayıcınızda karşılaştırılır; sürüm hiçbir yere gönderilmez.
—
Paket düzeyi etkilenme
OSV ve GitHub Advisory verisi: ekosistem, paket ve aralık. SBOM eşleşmesi bu tabloyu kullanır.
| Ekosistem | Paket | Etkilenen aralık | Düzeltme |
|---|---|---|---|
| npm | @nestjs/platform-fastify | 12.0.0 itibarıyla · 12.0.2 öncesi | 12.0.2 |
| npm | @nestjs/platform-fastify | 11.2.4 öncesi | 11.2.4 |
Düzeltme
Hangi sürüme geçmeli
Üretici, paket deposu ve Microsoft kayıtlarından derlenen düzeltme sürümleri. Yükseltmeden önce üreticinin notunu doğrulayın.
| Ürün / paket | Düzeltilmiş sürüm | Kaynak |
|---|---|---|
| npm:@nestjs/platform-fastify | 11.2.4 | Paket deposu (OSV) |
| npm:@nestjs/platform-fastify | 12.0.2 | Paket deposu (OSV) |
İstismar durumu
Bilinen kamuya açık istismar yok
Şu an kamuya açık bir istismar görülmedi. Bu, güvende olduğunuz anlamına gelmez; yalnızca eşiğin biraz daha yüksek olduğunu gösterir.
Araştırma bağlamı
Pentester ve araştırmacı için: saldırı profili, puan anlaşmazlığı, zaman çizelgesi, yama commit’leri, kredi, varyant ve zincir adayları, bug bounty kapsamı. Hepsi mevcut veriden türetilir; istismar kodu içermez.
Zaman çizelgesi
Yayından bugüne: kavram kanıtı, Metasploit modülü, CISA KEV ve düzeltme kaydı. Tarihler kaynakların bildirdiği tarihlerdir.
- Yayın
- Düzeltme kaydı+22 gün
- Bugün16 Kas 2026+47 gün
Yama ve commit bağlantıları
Referanslardaki commit, PR ve diff adresleri. Patch-diff ve varyant avı için başlangıç noktası; istismar değil, düzeltmedir.
Bu kayıtta yok: EPSS geçmişi · araştırmacı kredisi · varyant ya da zincir adayı · herkese açık ödül programı.
Teknik detay
Saldırı koşulları
- İnternetten erişebilen herkes tetikleyebilir.
- Hesap ya da parola gerekmez.
- Kullanıcının bir şey yapması gerekmez.
- Zamanlama ya da yapılandırma gibi özel koşullar gerekir.
Başarılı olursa
- Gizlilik
- yüksek · veriler okunabilir
- Bütünlük
- yüksek · veri ya da yapılandırma değiştirilebilir
- Erişilebilirlik
- yok
- Saldırı vektörü
- Ağ
- Karmaşıklık
- Yüksek
- Gereken yetki
- Yok
- Kullanıcı etkileşimi
- Gerekmez
- Kapsam
- Değişmez
- Gizlilik etkisi
- Yüksek
- Bütünlük etkisi
- Yüksek
- Erişilebilirlik etkisi
- Yok
Zayıflık sınıfı (CWE)
CWE-288 · Authentication Bypass Using an Alternate Path or ChannelCVSS vektörü
CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:H/I:H/A:N
osv
Saldırı bağlamı
Bu zafiyet sınıfının (CWE) MITRE CAPEC saldırı desenleri ve ATT&CK teknikleri. Tespit kuralı ve tehdit avı için başlangıç noktası.
Saldırı desenleri (CAPEC)
Değişiklik günlüğü (2)
- İstismar olgunluğu— → none
- Düzeltme✗ → ✓
Takip ettiğiniz kayıtlarda bu değişiklikler bildirim olarak da gelir. →
Referanslar
Tüm referansları göster (7 daha)Daha az göster
- github.com/nestjs/nest/security/advisories/GHSA-9c5c-9qcx-q35q
- github.com/nestjs/nest/pull/17737
- github.com/nestjs/nest/commit/5226fe084cf64b357de436f154bc89f2d319b621
- github.com/nestjs/nest/commit/dda252090ecb65009d9ff366444303796fc44fd7
- github.com/nestjs/nest
- github.com/nestjs/nest/releases/tag/v11.2.4
- github.com/nestjs/nest/releases/tag/v12.0.2
Üretici bildirimleri ve resmî kayıtlar. İstismar/PoC bağlantıları bilinçli olarak dışarıda bırakıldı.