Cross-Site Scripting (XSS) in generator-jhipster (CVE-2026-107303)
Summary
Cross-site scripting in generator-jhipster (CVE-2026-107303). Confidential information can be exposed externally. Exploitable via POST /api/documents. Mitigation: upgrade to 9.4.0 or later.
Original description
The description as published by the source.
Summary
Applications generated by generator-jhipster v9.2.0 can persist user-controlled Blob ContentType values and later use those values as the MIME type for client-side Blob objects. The shared generated openFile helper creates an object URL from the Blob and opens it in a new window.
For Blob-bearing entities writable by normal authenticated users, this creates a stored XSS chain: attacker-controlled Blob content and MIME type are stored through the generated REST API, returned to privileged users, and opened as a same-origin Blob document from the generated Angular/React/Vue UI. Exploitability should be confirmed against the generated app’s CSP and target browsers.
Details
The root cause is a trust-boundary failure across generated server and client code. The generated entity REST resource accepts request bodies for entity creation and update. Unless an entity-specific authority is configured, the template omits method-level @PreAuthorize, leaving the endpoint available to any authenticated user under the global /api/** security rule.
The generated DTO/domain/mapper flow stores the companion ContentType property as a plain String and persists it with the entity Blob data. The relevant templates include generators/spring-boot/templates/src/main/java/_package_/_entityPackage_/service/dto/_dtoClass_.java.ejs:96-122 and generators/java/generators/domain/templates/src/main/java/_package_/_entityPackage_/domain/_persistClass_.java.jhi.ejs:124-140. The ge…
Source: GitHub Security Advisories (Global) NVD GitHub Advisory
Auto-generated summary
Assembled by SecPulse from the source data (CVSS, CWE, affected versions) using templates — no AI involved. Check the original description and references below for exact details.
A vulnerability tracked as CVE-2026-107303 has been found in generator-jhipster.
Attackers can target a specific entry point like POST /api/documents over the network to misuse the product.
Confidential information can be exposed externally. CVSS score: 7.6/10.
What to do: upgrade generator-jhipster to 9.4.0 or later.
If unsure, ask your IT team or search "generator-jhipster CVE-2026-107303" on the vendor's site.
CVE-2026-107303 (generator-jhipster) — CWE-79 / CVSS v3 7.6
Attack vector: remote (network-reachable)
Attack surface: POST /api/documents / GET /api/documents/{id} / openFile / String
Patched: 9.4.0 — apply immediately
Plan: 1) Audit SBOM/dependencies, 2) Stage→prod upgrade, 3) Add WAF/proxy monitoring on affected endpoints, 4) Hunt IOCs in logs.
Refs: see the GHSA / vendor advisory / patched release linked on this page.
Cross-site scripting (XSS) (CWE-79) exists in generator-jhipster. Attackers reach the vulnerable code path via POST /api/documents.
Check the vendor advisory for the affected versions of generator-jhipster. Attack surface: POST /api/documents / GET /api/documents/{id} / openFile / String.
Severity: High (CVSS 7.6/10). Confidential information can be exposed externally.
Update to 9.4.0.
Until the patch is applied: disable the affected feature, apply WAF rules, or restrict access via network ACLs.
Search webserver/proxy logs for unusual POST /api/documents requests with malformed payloads or SQL meta-characters. Run grep -r 'generator-jhipster' . against your dependency files (package-lock.json, requirements.txt, go.sum) to find affected services.
Response actions
Concrete steps and command examples for SOC/SRE teams to execute in order
-
1Identify exposure identify
grep -r 'generator-jhipster' . | grep -v node_modulesリポジトリと本番環境の依存ファイル (package-lock.json / requirements.txt / go.sum / Gemfile.lock 等) で
generator-jhipsterを grep し、稼働しているサービス・バージョンを把握する。 -
2Hunt for indicators of compromise detect
grep 'POST /api/documents' /var/log/nginx/access.log | grep -E '(unusual_payload|sqli_pattern)'アクセスログで
POST /api/documentsへの異常なリクエスト (不正な認証ヘッダ・SQLメタ文字)を過去 30〜90日分捜索。WAF/SIEM があれば該当パスのアラート発火履歴を確認。 -
3Apply patch patch
Upgrade generator-jhipster to 9.4.0ステージング環境で 9.4.0 に上げて回帰テスト → 本番反映。回帰テストはアプリの主要ハッピーパスと、Step 2 で見つけた異常検知の続報チェックを含めること。
-
4Post-deployment verification verify
Replay attack against POST /api/documents on staging to confirm patch closes the vectorパッチ適用後、ステージングで PoC または同等の悪用パターンを再現して脆弱性が閉じたことを確認。本番では Step 2 と同じログクエリでアラート再発が無いか継続監視。
Affected packages
References
- package github.com
- web github.com
- web github.com
- web github.com
- web github.com
- web github.com