| CRITICAL | OWASP-API2 路 API2:2023 Broken Authentication | apps/api/src/routes/admin/index.ts | 15 | POST /admin/tenants/:tenantId/impersonate has no authentication - endpoint is publicly accessible and accesses object by ID (tenantId) |
| CRITICAL | OWASP-API2 路 API2:2023 Broken Authentication | apps/web/app/(dashboard)/invoices/mutations.ts | 17 | Next.js server action `exportCustomerLedger` performs `prisma.customer.findUnique` keyed by its own argument `customerId` with no session or authorization check - any visitor can invoke a server action by its action id |
| CRITICAL | OWASP-API8 路 API8:2023 Security Misconfiguration | apps/api/src/repositories/customersRepository.ts | 18 | tainted request value reaches SQL query without parameter binding. Source: `entry:request` on parameter `term` of `search`. |
| CRITICAL | OWASP-API8 路 API8:2023 Security Misconfiguration | apps/rpc/src/graphql/customerQueries.ts | 22 | tainted request value reaches SQL query without parameter binding. Source: `graphql:args` on parameter `filter` of `search`, reaching the sink through local `where`. |
| CRITICAL | OWASP-API8 路 API8:2023 Security Misconfiguration | packages/llm/src/mcp/server.ts | 20 | tainted request value reaches child_process / shell. Source: `tool:arguments` on parameter `tenant` of `entry@line19`. |
| CRITICAL | OWASP-API8 路 API8:2023 Security Misconfiguration | packages/llm/src/tools.ts | 55 | tainted request value reaches child_process / shell. Source: `entry:request` on parameter `tenantId` of `runLedgerReport`. |
| CRITICAL | OWASP-API8 路 API8:2023 Security Misconfiguration | apps/api/src/routes/public.ts | 45 | tainted request value reaches a filesystem path (path traversal). Source: `entry:request` on parameter `req` of `entry@line43`, reaching the sink through local `name`. |
| CRITICAL | OWASP-API8 路 API8:2023 Security Misconfiguration | apps/api/src/routes/v1/attachments.ts | 33 | tainted request value reaches a filesystem path (path traversal). Source: `entry:request` on parameter `req` of `entry@line31`, reaching the sink through local `file`. |
| CRITICAL | OWASP-API8 路 API8:2023 Security Misconfiguration | apps/api/src/lib/pdf.ts | 31 | tainted request value reaches child_process / shell. Source: `entry:request` on parameter `opts` of `renderPdf`, reaching the sink through local `outFile`. |
| CRITICAL | OWASP-API7 路 API7:2023 Server Side Request Forgery | apps/api/src/lib/webhookClient.ts | 26 | tainted request value reaches an HTTP client URL without host validation (SSRF, CWE-918). Source: `entry:request` on parameter `url` of `sendTest`. |
| CRITICAL | OWASP-API8 路 API8:2023 Security Misconfiguration | apps/api/src/repositories/invoiceRepo.ts | 25 | tainted request value reaches SQL query without parameter binding. Source: `entry:request` on parameter `name` of `searchByCustomerName`, reaching the sink through local `sql`. |
| CRITICAL | OWASP-API8 路 API8:2023 Security Misconfiguration | apps/api/src/routes/v1/audit.ts | 23 | tainted request value reaches NoSQL query without sanitisation. Source: `entry:request` on parameter `req` of `entry@line21`, reaching the sink through local `filter`. |
| CRITICAL | OWASP-API8 路 API8:2023 Security Misconfiguration | apps/web/lib/search.ts | 19 | tainted request value reaches SQL query without parameter binding. Source: `next:server-action` on parameter `term` of `searchInvoices`, reaching the sink through local `sql`. |
| CRITICAL | OWASP-API10 路 API10:2023 Unsafe Consumption of APIs | apps/api/package.json | 25 | mongoose 8.4.1 has 4 known vulnerabilities (CVE-2026-73562 (GHSA-664h-wqgq-64gw)) [reachability unknown] |
| CRITICAL | OWASP-API10 路 API10:2023 Unsafe Consumption of APIs | apps/web/package.json | 16 | next 14.2.10 has 33 known vulnerabilities (GHSA-2xp9-vwfh-vxw4) [EPSS 99%] [reachability unknown] |
| CRITICAL | OWASP-API3 路 API3:2023 Broken Object Property Level Authorization | apps/api/src/routes/v1/users.ts | 17 | Mass assignment: PATCH /api/v1/users/me hands the whole request body to a write call (`const user = await usersService.updateProfile(req.user!.id, { ...req.body });`) - any column the caller names, including role or tenant fields, is written |
| CRITICAL | OWASP-API2 路 API2:2023 Broken Authentication | apps/web/app/api/exports/[tenant]/ledger/route.ts | 6 | GET /api/exports/{tenant}/ledger is outside the middleware matcher (the project authenticates through middleware.ts matcher '/invoices/:path*' (not a guard: next 14.2.10 is affected by CVE-2025-29927, middleware can be skipped)) and performs no session check of its own - line 7 passes `period` to a data helper |
| CRITICAL | OWASP-API2 路 API2:2023 Broken Authentication | apps/web/app/api/invoices/[id]/route.ts | 7 | GET /api/invoices/{id} is authenticated only by the Next.js middleware (middleware.ts matcher '/api/invoices/:path*' (not a guard: next 14.2.10 is affected by CVE-2025-29927, middleware can be skipped)) and performs no check of its own; the installed `next` is affected by CVE-2025-29927, where an `x-middleware-subrequest` header skips middleware entirely (line 8 trusts an identity header only the middleware sets) |
| CRITICAL | OWASP-API5 路 API5:2023 Broken Function Level Authorization | apps/rpc/src/trpc/routers/user.ts | 11 | Privilege escalation: POST /trpc/user.setRole writes a role / privilege field from caller input (line 12) and requires no role - any signed-in user can grant any account, including their own, an admin role |
| HIGH | OWASP-API2 路 API2:2023 Broken Authentication | apps/rpc/src/trpc/routers/invoice.ts | 6 | GET /trpc/invoice.byNumber has no authentication - endpoint is publicly accessible |
| HIGH | OWASP-API8 路 API8:2023 Security Misconfiguration | apps/api/src/routes/public.ts | 28 | tainted request value reaches an HTML response sink without escaping (reflected XSS). Source: `entry:request` on parameter `req` of `entry@line26`, reaching the sink through local `email`. |
| HIGH | OWASP-API8 路 API8:2023 Security Misconfiguration | apps/api/src/routes/v1/customers.ts | 38 | tainted request value reaches a deep merge / path set / computed-key write that can write through `__proto__` and mutate Object.prototype (prototype pollution). Source: `entry:request` on parameter `req` of `entry@line37`. |
| HIGH | OWASP-API8 路 API8:2023 Security Misconfiguration | apps/api/src/routes/v1/invoices.ts | 50 | tainted request value reaches a deep merge / path set / computed-key write that can write through `__proto__` and mutate Object.prototype (prototype pollution). Source: `entry:request` on parameter `req` of `entry@line46`, reaching the sink through local `fieldPath`. |
| HIGH | OWASP-API8 路 API8:2023 Security Misconfiguration | apps/api/src/routes/v1/invoices.ts | 70 | tainted request value reaches a filesystem path (path traversal). Source: `entry:request` on parameter `req` of `entry@line67`, reaching the sink through local `file`. |
| HIGH | OWASP-API4 路 API4:2023 Unrestricted Resource Consumption | apps/api/src/routes/v1/reports.ts | 15 | tainted request value is compiled as a regular expression PATTERN (regex injection / ReDoS): a catastrophically backtracking pattern stalls the event loop. Source: `entry:request` on parameter `req` of `entry@line13`, reaching the sink through local `pattern`. |
| HIGH | OWASP-API8 路 API8:2023 Security Misconfiguration | apps/api/src/routes/v1/settings.ts | 17 | tainted request value reaches a deep merge / path set / computed-key write that can write through `__proto__` and mutate Object.prototype (prototype pollution). Source: `entry:request` on parameter `req` of `entry@line12`, reaching the sink through local `section`. |
| HIGH | OWASP-API8 路 API8:2023 Security Misconfiguration | apps/api/src/services/tenantExporter.ts | 8 | tainted request value reaches child_process / shell. Source: `entry:request` on parameter `tenantId` of `dumpTenant`, reaching the sink through local `outFile`. |
| HIGH | OWASP-API10 路 API10:2023 Unsafe Consumption of APIs | apps/api/package.json | 24 | lodash 4.17.10 has 9 known vulnerabilities (CVE-2020-28500 (GHSA-29mw-wpgm-hmr9)) [unreachable] |
| HIGH | OWASP-API10 路 API10:2023 Unsafe Consumption of APIs | apps/api/package.json | 26 | multer 1.4.5-lts.1 has 11 known vulnerabilities (CVE-2025-47935 (GHSA-44fp-w29j-9vj5)) [reachability unknown] |
| HIGH | OWASP-API10 路 API10:2023 Unsafe Consumption of APIs | apps/api/package.json | 27 | nodemailer 6.9.13 has 14 known vulnerabilities (CVE-2026-82661 (GHSA-268h-hp4c-crq3)) [reachability unknown] |
| HIGH | OWASP-API10 路 API10:2023 Unsafe Consumption of APIs | apps/rpc/package.json | 12 | @apollo/server 4.10.4 has 2 known vulnerabilities (GHSA-9q82-xgwf-vj6h) [reachability unknown] |
| HIGH | OWASP-API10 路 API10:2023 Unsafe Consumption of APIs | apps/rpc/package.json | 14 | @trpc/server 10.45.2 has 1 known vulnerability (CVE-2025-68130 (GHSA-43p4-m455-4f4j)) [reachability unknown] |
| HIGH | OWASP-API10 路 API10:2023 Unsafe Consumption of APIs | packages/llm/package.json | 12 | @modelcontextprotocol/sdk 1.12.1 has 7 known vulnerabilities (CVE-2026-25536 (GHSA-345p-7cg4-v4c7)) [reachability unknown] |
| HIGH | OWASP-API1 路 API1:2023 Broken Object Level Authorization | apps/api/src/routes/v1/invoices.ts | 21 | IDOR: GET /api/v1/invoices/:id authenticates the caller but `invoiceService.getById` (line 22) is keyed by the caller-supplied `id` with no ownership or tenant check - any signed-in user can reach another user's record |
| HIGH | OWASP-API1 路 API1:2023 Broken Object Level Authorization | apps/web/app/(dashboard)/settings/page.tsx | 9 | IDOR: POST /settings authenticates the caller but `prisma.tenantSettings.upsert` (line 13) is keyed by the caller-supplied `tenantId` with no ownership or tenant check - any signed-in user can reach another user's record |
| MEDIUM | OWASP-API2 路 API2:2023 Broken Authentication | apps/api/src/middleware/auth.ts | 16 | JWT read with jwt.decode(), which does not verify the signature - a forged or tampered token is accepted as genuine |
| MEDIUM | OWASP-API8 路 API8:2023 Security Misconfiguration | apps/web/app/(dashboard)/invoices/[id]/page.tsx | 34 | React `dangerouslySetInnerHTML` is wired to a dynamic expression - potential XSS sink |
| MEDIUM | OWASP-API8 路 API8:2023 Security Misconfiguration | apps/api/src/routes/v1/attachments.ts | 40 | Path traversal: filesystem entry-point receives a request-controlled path - attacker may read or write outside the intended directory |
| MEDIUM | OWASP-API8 路 API8:2023 Security Misconfiguration | apps/api/src/routes/public.ts | 14 | tainted request value reaches a redirect (Location header) without allowlisting (open redirect). Source: `entry:request` on parameter `req` of `entry@line12`, reaching the sink through local `to`. |
| MEDIUM | OWASP-API8 路 API8:2023 Security Misconfiguration | apps/api/src/routes/public.ts | 63 | CRLF-002: user-controlled value flows into HTTP header / cookie / redirect without CRLF validation. A `\r\n` payload in the value splits the response and lets the attacker forge a second header or response. |
| MEDIUM | OWASP-API8 路 API8:2023 Security Misconfiguration | apps/api/src/routes/v1/auth.ts | 33 | CRLF-002: user-controlled value flows into HTTP header / cookie / redirect without CRLF validation. A `\r\n` payload in the value splits the response and lets the attacker forge a second header or response. |
| MEDIUM | OWASP-API8 路 API8:2023 Security Misconfiguration | apps/api/src/routes/v1/auth.ts | 21 | PII in logs - `logger.info` call carries `req.body`; sensitive data will be persisted by the log shipper |
| MEDIUM | OWASP-API8 路 API8:2023 Security Misconfiguration | apps/api/src/server.ts | 27 | CORS-REFLECT-002: a `cors(...)` config reflects every request origin (`origin: true`, or a callback that always calls `cb(null, true)`) while `credentials: true` is set. The middleware echoes back the caller's own origin as allowed, so any site can issue credentialed cross-origin requests and read the authenticated responses (CWE-942). |
| MEDIUM | OWASP-API2 路 API2:2023 Broken Authentication | apps/api/src/config.ts | 17 | Hardcoded JWT secret - the token signing key is a string literal in configuration; anyone with the source or the build can forge tokens |
| MEDIUM | OWASP-API8 路 API8:2023 Security Misconfiguration | apps/api/src/server.ts | 26 | CORS misconfiguration: wildcard `Access-Control-Allow-Origin: *` paired with `Access-Control-Allow-Credentials: true` (cors() middleware) |
| MEDIUM | OWASP-API8 路 API8:2023 Security Misconfiguration | apps/api/src/middleware/errors.ts | 18 | User-controlled value passed to logger without newline sanitisation - log-injection / log-forging risk |
| MEDIUM | OWASP-API8 路 API8:2023 Security Misconfiguration | apps/api/src/services/billingService.ts | 7 | Hardcoded production-internal service URL in source - environment-specific config leaks into the codebase; dev / stage / prod cutovers require a code change |
| MEDIUM | OWASP-API4 路 API4:2023 Unrestricted Resource Consumption | apps/api/src/lib/mailer.ts | 1 | Email send appears in an HTTP handler with no queue / background-job library imported anywhere in the project. Synchronous SMTP / SES / SendGrid calls block the request thread, leak latency to the user, and lose all messages on provider outage. |
| MEDIUM | OWASP-API1 路 API1:2023 Broken Object Level Authorization | apps/api/src/routes/v1/attachments.ts | 17 | Insecure direct file access - request-derived path flows into a file-serve sink without an authorisation / path-validation guard |
| MEDIUM | OWASP-API1 路 API1:2023 Broken Object Level Authorization | apps/api/src/routes/v1/attachments.ts | 33 | Insecure direct file access - request-derived path flows into a file-serve sink without an authorisation / path-validation guard |
| MEDIUM | OWASP-API1 路 API1:2023 Broken Object Level Authorization | apps/api/src/routes/v1/customers.ts | 53 | GET /api/v1/customers/:id fetches an object by `id` from the path with no visible ownership / tenant filter - anyone authenticated can read another user's record |
| MEDIUM | OWASP-API10 路 API10:2023 Unsafe Consumption of APIs | apps/api/package.json | 16 | axios 1.7.2 has 34 known vulnerabilities (CVE-2026-44494 (GHSA-35jp-ww65-95wh)) [unreachable] |
| MEDIUM | OWASP-API10 路 API10:2023 Unsafe Consumption of APIs | apps/api/package.json | 20 | express 4.19.2 has 1 known vulnerability (CVE-2024-43796 (GHSA-qw6h-vgh9-j6wx)) [reachability unknown] |
| MEDIUM | OWASP-API10 路 API10:2023 Unsafe Consumption of APIs | apps/rpc/package.json | 17 | express 4.19.2 has 1 known vulnerability (CVE-2024-43796 (GHSA-qw6h-vgh9-j6wx)) [reachability unknown] |
| MEDIUM | OWASP-API10 路 API10:2023 Unsafe Consumption of APIs | packages/llm/package.json | 13 | express 4.19.2 has 1 known vulnerability (CVE-2024-43796 (GHSA-qw6h-vgh9-j6wx)) [reachability unknown] |
| MEDIUM | OWASP-API8 路 API8:2023 Security Misconfiguration | apps/api/src/repositories/usersRepository.ts | 50 | Secret column `users.resetToken` (declared at packages/db/prisma/schema.prisma:44) is stored in plain text: 1 write site (first at apps/api/src/repositories/usersRepository.ts:50) stores the raw value with no hash or encryption |
| MEDIUM | OWASP-API5 路 API5:2023 Broken Function Level Authorization | apps/api/src/routes/admin/index.ts | 15 | Likely-forgotten authorization: `POST /admin/tenants/:tenantId/impersonate` has no auth guard, but 2 of 3 routes on the same controller / router do - this odd-one-out is probably a missing function-level authz check (OWASP API5 / BFLA) |
| MEDIUM | OWASP-LLM01 路 LLM01:2025 Prompt Injection | packages/llm/src/tools.ts | 71 | LLM tool `email_summary` calls `sendDocument` with a destination the model chooses (`args.to`) and no allowlist or user confirmation - content the agent reads can steer it into sending the user's data to any address |
| MEDIUM | OWASP-API2 路 API2:2023 Broken Authentication | apps/api/src/services/passwordResetService.ts | 10 | Insecure RNG used to mint a token, secret, or session identifier - its output is predictable and not cryptographically random |
| MEDIUM | OWASP-API8 路 API8:2023 Security Misconfiguration | apps/api/src/services/billingService.ts | 17 | PII in logs - `logger.info` call carries `customer`; sensitive data will be persisted by the log shipper |
| MEDIUM | OWASP-API3 路 API3:2023 Broken Object Property Level Authorization | apps/api/src/routes/v1/customers.ts | 25 | GET /api/v1/customers/lookup returns `customer` without a visible field allowlist - every column on the record (including ssn / password_hash / internal_notes) goes over the wire |
| MEDIUM | OWASP-API3 路 API3:2023 Broken Object Property Level Authorization | apps/api/src/routes/v1/settings.ts | 10 | PATCH /api/v1/settings/preferences returns `prefs` without a visible field allowlist - every column on the record (including ssn / password_hash / internal_notes) goes over the wire |
| MEDIUM | OWASP-API3 路 API3:2023 Broken Object Property Level Authorization | apps/api/src/routes/v1/settings.ts | 27 | PUT /api/v1/settings/branding returns `branding` without a visible field allowlist - every column on the record (including ssn / password_hash / internal_notes) goes over the wire |
| MEDIUM | OWASP-API8 路 API8:2023 Security Misconfiguration | apps/api/src/routes/public.ts | 27 | Query-string parameter `email` carries PII - URL captured by every proxy / CDN / APM trace in the request chain |
| MEDIUM | OWASP-API8 路 API8:2023 Security Misconfiguration | apps/api/src/routes/v1/customers.ts | 28 | Query-string parameter `email` carries PII - URL captured by every proxy / CDN / APM trace in the request chain |
| MEDIUM | OWASP-API8 路 API8:2023 Security Misconfiguration | apps/api/src/routes/v1/customers.ts | 16 | GET /api/v1/customers returns PII-shaped data with no `Cache-Control: no-store` - responses may be cached by CDNs / browsers / proxies |
| MEDIUM | OWASP-API8 路 API8:2023 Security Misconfiguration | apps/api/src/routes/v1/customers.ts | 25 | GET /api/v1/customers/lookup returns PII-shaped data with no `Cache-Control: no-store` - responses may be cached by CDNs / browsers / proxies |
| MEDIUM | OWASP-API8 路 API8:2023 Security Misconfiguration | apps/api/src/routes/v1/customers.ts | 53 | GET /api/v1/customers/:id returns PII-shaped data with no `Cache-Control: no-store` - responses may be cached by CDNs / browsers / proxies |
| MEDIUM | OWASP-API8 路 API8:2023 Security Misconfiguration | apps/api/src/routes/v1/users.ts | 7 | GET /api/v1/users/me returns PII-shaped data with no `Cache-Control: no-store` - responses may be cached by CDNs / browsers / proxies |
| MEDIUM | OWASP-API5 路 API5:2023 Broken Function Level Authorization | apps/api/src/routes/v1/audit.ts | 7 | Admin-shaped route GET /api/v1/audit lives outside an /admin or /internal namespace - operations boundaries (IP allow-list, WAF rules, SSO scope) likely won't apply here |
| MEDIUM | OWASP-API5 路 API5:2023 Broken Function Level Authorization | apps/api/src/routes/v1/audit.ts | 19 | Admin-shaped route POST /api/v1/audit/query lives outside an /admin or /internal namespace - operations boundaries (IP allow-list, WAF rules, SSO scope) likely won't apply here |
| MEDIUM | OWASP-API7 路 API7:2023 Server Side Request Forgery | apps/web/middleware.ts | 10 | Taint-confirmed open redirect: data from req.nextUrl (line 7) reaches `NextResponse.redirect` without sanitization. Crafted input from a request can drive the sink. |
| LOW | OWASP-API5 路 API5:2023 Broken Function Level Authorization | apps/api/src/routes/admin/index.ts | 30 | Administrative endpoint GET /admin/tenants is authenticated but no role/admin check is visible in the handler (any logged-in user can call it) |
| LOW | OWASP-API5 路 API5:2023 Broken Function Level Authorization | apps/api/src/routes/admin/index.ts | 42 | Administrative endpoint POST /admin/tenants/:tenantId/export is authenticated but no role/admin check is visible in the handler (any logged-in user can call it) |
| LOW | OWASP-API4 路 API4:2023 Unrestricted Resource Consumption | apps/api/src/routes/public.ts | 31 | POST /public/invoices/:shareToken/comments has no rate limiting - vulnerable to brute-force or DoS |
| LOW | OWASP-API4 路 API4:2023 Unrestricted Resource Consumption | apps/api/src/routes/v1/auth.ts | 28 | POST /api/v1/auth/login has no rate limiting - vulnerable to brute-force or DoS |
| LOW | OWASP-API4 路 API4:2023 Unrestricted Resource Consumption | apps/api/src/routes/v1/auth.ts | 38 | POST /api/v1/auth/password-reset has no rate limiting - vulnerable to brute-force or DoS |
| LOW | OWASP-API4 路 API4:2023 Unrestricted Resource Consumption | apps/api/src/routes/v1/auth.ts | 47 | POST /api/v1/auth/password-reset/confirm has no rate limiting - vulnerable to brute-force or DoS |
| LOW | OWASP-API8 路 API8:2023 Security Misconfiguration | apps/api/src/routes/admin/index.ts | 15 | No CSRF-protection library detected - browser-origin state-changing requests may be forgeable (first state-changing route: POST /admin/tenants/:tenantId/impersonate) |
| LOW | OWASP-API4 路 API4:2023 Unrestricted Resource Consumption | apps/api/src/routes/admin/index.ts | 30 | Admin listing /admin/tenants may return unbounded data - large customer accounts can cause query timeouts and admin-panel hangs |