@hoanghainh/komagu 1.8.0 → 2.0.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +20 -0
- package/README.md +1 -1
- package/assess/lsa/CHANGELOG.md +6 -0
- package/assess/lsa/VERSION +1 -1
- package/assess/lsa/adapters/build_adapters.py +16 -8
- package/assess/lsa/adapters/codex/README.md +1 -1
- package/assess/lsa/adapters/generic/README.md +1 -1
- package/assess/lsa/examples/eval-run-4/ground-truth.json +823 -0
- package/assess/lsa/examples/eval-run-4/iter0-gptoss-a/ai-run-stats.json +58 -0
- package/assess/lsa/examples/eval-run-4/iter0-gptoss-a/coverage.json +85 -0
- package/assess/lsa/examples/eval-run-4/iter0-gptoss-a/findings/priv-privilege-001.json +822 -0
- package/assess/lsa/examples/eval-run-4/iter0-gptoss-a/findings/priv-privilege-002.json +393 -0
- package/assess/lsa/examples/eval-run-4/iter0-gptoss-a/findings.json +4477 -0
- package/assess/lsa/examples/eval-run-4/iter0-gptoss-a/mass-assignment.candidates.json +232 -0
- package/assess/lsa/examples/eval-run-4/iter0-gptoss-a/routes/routes-001.json +425 -0
- package/assess/lsa/examples/eval-run-4/iter0-gptoss-a/routes/routes-002.json +333 -0
- package/assess/lsa/examples/eval-run-4/iter0-gptoss-a/routes/routes-003.json +400 -0
- package/assess/lsa/examples/eval-run-4/iter0-gptoss-a/routes/routes-004.json +403 -0
- package/assess/lsa/examples/eval-run-4/iter0-gptoss-a/routes/routes-005.json +398 -0
- package/assess/lsa/examples/eval-run-4/iter0-gptoss-a/routes/routes-006.json +63 -0
- package/assess/lsa/examples/eval-run-4/iter0-gptoss-a/score.json +120 -0
- package/assess/lsa/examples/eval-run-4/iter1-gptoss-a/ai-run-stats.json +55 -0
- package/assess/lsa/examples/eval-run-4/iter1-gptoss-a/coverage.json +50 -0
- package/assess/lsa/examples/eval-run-4/iter1-gptoss-a/findings/priv-privilege-001.json +613 -0
- package/assess/lsa/examples/eval-run-4/iter1-gptoss-a/findings/priv-privilege-002.json +287 -0
- package/assess/lsa/examples/eval-run-4/iter1-gptoss-a/findings.json +4870 -0
- package/assess/lsa/examples/eval-run-4/iter1-gptoss-a/mass-assignment.candidates.json +232 -0
- package/assess/lsa/examples/eval-run-4/iter1-gptoss-a/routes/routes-001.json +425 -0
- package/assess/lsa/examples/eval-run-4/iter1-gptoss-a/routes/routes-002.json +333 -0
- package/assess/lsa/examples/eval-run-4/iter1-gptoss-a/routes/routes-003.json +400 -0
- package/assess/lsa/examples/eval-run-4/iter1-gptoss-a/routes/routes-004.json +403 -0
- package/assess/lsa/examples/eval-run-4/iter1-gptoss-a/routes/routes-005.json +398 -0
- package/assess/lsa/examples/eval-run-4/iter1-gptoss-a/routes/routes-006.json +63 -0
- package/assess/lsa/examples/eval-run-4/iter1-gptoss-a/score.json +107 -0
- package/assess/lsa/examples/eval-run-4/iter1-gptoss-b/ai-run-stats.json +58 -0
- package/assess/lsa/examples/eval-run-4/iter1-gptoss-b/coverage.json +92 -0
- package/assess/lsa/examples/eval-run-4/iter1-gptoss-b/findings/priv-privilege-001.json +645 -0
- package/assess/lsa/examples/eval-run-4/iter1-gptoss-b/findings/priv-privilege-002.json +222 -0
- package/assess/lsa/examples/eval-run-4/iter1-gptoss-b/findings.json +4859 -0
- package/assess/lsa/examples/eval-run-4/iter1-gptoss-b/mass-assignment.candidates.json +232 -0
- package/assess/lsa/examples/eval-run-4/iter1-gptoss-b/routes/routes-001.json +425 -0
- package/assess/lsa/examples/eval-run-4/iter1-gptoss-b/routes/routes-002.json +333 -0
- package/assess/lsa/examples/eval-run-4/iter1-gptoss-b/routes/routes-003.json +400 -0
- package/assess/lsa/examples/eval-run-4/iter1-gptoss-b/routes/routes-004.json +403 -0
- package/assess/lsa/examples/eval-run-4/iter1-gptoss-b/routes/routes-005.json +398 -0
- package/assess/lsa/examples/eval-run-4/iter1-gptoss-b/routes/routes-006.json +63 -0
- package/assess/lsa/examples/eval-run-4/iter1-gptoss-b/score.json +121 -0
- package/assess/lsa/examples/eval-run-4/iter1-qwen-a-incomplete/coverage.json +111 -0
- package/assess/lsa/examples/eval-run-4/iter1-qwen-a-incomplete/findings/priv-privilege-001.json +6 -0
- package/assess/lsa/examples/eval-run-4/iter1-qwen-a-incomplete/findings/priv-privilege-002.json +344 -0
- package/assess/lsa/examples/eval-run-4/iter1-qwen-a-incomplete/findings.json +3544 -0
- package/assess/lsa/examples/eval-run-4/iter1-qwen-a-incomplete/mass-assignment.candidates.json +232 -0
- package/assess/lsa/examples/eval-run-4/iter1-qwen-a-incomplete/routes/routes-001.json +425 -0
- package/assess/lsa/examples/eval-run-4/iter1-qwen-a-incomplete/routes/routes-002.json +333 -0
- package/assess/lsa/examples/eval-run-4/iter1-qwen-a-incomplete/routes/routes-003.json +400 -0
- package/assess/lsa/examples/eval-run-4/iter1-qwen-a-incomplete/routes/routes-004.json +403 -0
- package/assess/lsa/examples/eval-run-4/iter1-qwen-a-incomplete/routes/routes-005.json +398 -0
- package/assess/lsa/examples/eval-run-4/iter1-qwen-a-incomplete/routes/routes-006.json +63 -0
- package/assess/lsa/examples/eval-run-4/iter1-qwen-a-incomplete/score.json +123 -0
- package/assess/lsa/examples/eval-run-4/iter2-gptoss-a/ai-run-stats.json +50 -0
- package/assess/lsa/examples/eval-run-4/iter2-gptoss-a/coverage.json +42 -0
- package/assess/lsa/examples/eval-run-4/iter2-gptoss-a/findings/priv-privilege-001.json +540 -0
- package/assess/lsa/examples/eval-run-4/iter2-gptoss-a/findings/priv-privilege-002.json +238 -0
- package/assess/lsa/examples/eval-run-4/iter2-gptoss-a/findings.json +4383 -0
- package/assess/lsa/examples/eval-run-4/iter2-gptoss-a/findings.sarif +8729 -0
- package/assess/lsa/examples/eval-run-4/iter2-gptoss-a/mass-assignment.candidates.json +232 -0
- package/assess/lsa/examples/eval-run-4/iter2-gptoss-a/report.ja.md +1911 -0
- package/assess/lsa/examples/eval-run-4/iter2-gptoss-a/report.md +1911 -0
- package/assess/lsa/examples/eval-run-4/iter2-gptoss-a/routes/routes-001.json +425 -0
- package/assess/lsa/examples/eval-run-4/iter2-gptoss-a/routes/routes-002.json +333 -0
- package/assess/lsa/examples/eval-run-4/iter2-gptoss-a/routes/routes-003.json +400 -0
- package/assess/lsa/examples/eval-run-4/iter2-gptoss-a/routes/routes-004.json +403 -0
- package/assess/lsa/examples/eval-run-4/iter2-gptoss-a/routes/routes-005.json +398 -0
- package/assess/lsa/examples/eval-run-4/iter2-gptoss-a/routes/routes-006.json +63 -0
- package/assess/lsa/examples/eval-run-4/iter2-gptoss-a/score.json +101 -0
- package/assess/lsa/examples/eval-run-4/iter2-gptoss-a/stack-profile.json +226 -0
- package/assess/lsa/examples/eval-run-4/iter2-gptoss-b/ai-run-stats.json +54 -0
- package/assess/lsa/examples/eval-run-4/iter2-gptoss-b/coverage.json +66 -0
- package/assess/lsa/examples/eval-run-4/iter2-gptoss-b/findings/priv-privilege-001.json +440 -0
- package/assess/lsa/examples/eval-run-4/iter2-gptoss-b/findings/priv-privilege-002.json +229 -0
- package/assess/lsa/examples/eval-run-4/iter2-gptoss-b/findings.json +3424 -0
- package/assess/lsa/examples/eval-run-4/iter2-gptoss-b/mass-assignment.candidates.json +232 -0
- package/assess/lsa/examples/eval-run-4/iter2-gptoss-b/routes/routes-001.json +425 -0
- package/assess/lsa/examples/eval-run-4/iter2-gptoss-b/routes/routes-002.json +333 -0
- package/assess/lsa/examples/eval-run-4/iter2-gptoss-b/routes/routes-003.json +400 -0
- package/assess/lsa/examples/eval-run-4/iter2-gptoss-b/routes/routes-004.json +403 -0
- package/assess/lsa/examples/eval-run-4/iter2-gptoss-b/routes/routes-005.json +398 -0
- package/assess/lsa/examples/eval-run-4/iter2-gptoss-b/routes/routes-006.json +63 -0
- package/assess/lsa/examples/eval-run-4/iter2-gptoss-b/score.json +120 -0
- package/assess/lsa/examples/eval-run-5/gptoss-a/ai-run-stats.json +88 -0
- package/assess/lsa/examples/eval-run-5/gptoss-a/coverage.json +36 -0
- package/assess/lsa/examples/eval-run-5/gptoss-a/findings/priv-privilege-001.json +530 -0
- package/assess/lsa/examples/eval-run-5/gptoss-a/findings/priv-privilege-002.json +248 -0
- package/assess/lsa/examples/eval-run-5/gptoss-a/findings.json +4766 -0
- package/assess/lsa/examples/eval-run-5/gptoss-a/findings.sarif +9326 -0
- package/assess/lsa/examples/eval-run-5/gptoss-a/mass-assignment.candidates.json +232 -0
- package/assess/lsa/examples/eval-run-5/gptoss-a/report.ja.md +2011 -0
- package/assess/lsa/examples/eval-run-5/gptoss-a/report.md +2011 -0
- package/assess/lsa/examples/eval-run-5/gptoss-a/routes/routes-001.json +425 -0
- package/assess/lsa/examples/eval-run-5/gptoss-a/routes/routes-002.json +333 -0
- package/assess/lsa/examples/eval-run-5/gptoss-a/routes/routes-003.json +400 -0
- package/assess/lsa/examples/eval-run-5/gptoss-a/routes/routes-004.json +403 -0
- package/assess/lsa/examples/eval-run-5/gptoss-a/routes/routes-005.json +398 -0
- package/assess/lsa/examples/eval-run-5/gptoss-a/routes/routes-006.json +63 -0
- package/assess/lsa/examples/eval-run-5/gptoss-a/score.json +80 -0
- package/assess/lsa/examples/eval-run-5/gptoss-a/stack-profile.json +226 -0
- package/assess/lsa/examples/eval-run-5/gptoss-b/ai-run-stats.json +83 -0
- package/assess/lsa/examples/eval-run-5/gptoss-b/coverage.json +44 -0
- package/assess/lsa/examples/eval-run-5/gptoss-b/findings/priv-privilege-001.json +579 -0
- package/assess/lsa/examples/eval-run-5/gptoss-b/findings/priv-privilege-002.json +268 -0
- package/assess/lsa/examples/eval-run-5/gptoss-b/findings.json +3913 -0
- package/assess/lsa/examples/eval-run-5/gptoss-b/mass-assignment.candidates.json +232 -0
- package/assess/lsa/examples/eval-run-5/gptoss-b/routes/routes-001.json +425 -0
- package/assess/lsa/examples/eval-run-5/gptoss-b/routes/routes-002.json +333 -0
- package/assess/lsa/examples/eval-run-5/gptoss-b/routes/routes-003.json +400 -0
- package/assess/lsa/examples/eval-run-5/gptoss-b/routes/routes-004.json +403 -0
- package/assess/lsa/examples/eval-run-5/gptoss-b/routes/routes-005.json +398 -0
- package/assess/lsa/examples/eval-run-5/gptoss-b/routes/routes-006.json +63 -0
- package/assess/lsa/examples/eval-run-5/gptoss-b/score.json +94 -0
- package/assess/lsa/examples/eval-run-5/ground-truth.json +823 -0
- package/assess/lsa/knowledge/severity-and-cwe.md +1 -1
- package/assess/lsa/prompts/35-privilege-auditor.md +3 -1
- package/assess/lsa/scripts/baseline.py +5 -2
- package/assess/lsa/scripts/findings_to_sarif.py +24 -1
- package/assess/lsa/tests/EVAL-RESULTS.md +156 -0
- package/assess/lsa/tests/score_findings.py +58 -0
- package/assess/lsa/tests/test_adapters.py +21 -2
- package/assess/lsa/tests/test_baseline.py +8 -0
- package/assess/lsa/tests/test_contract_groundwork.py +7 -7
- package/assess/lsa/tests/test_eval_run_4.py +73 -0
- package/assess/lsa/tests/test_eval_run_5.py +73 -0
- package/assess/lsa/tests/test_privilege_tier2.py +30 -0
- package/operate/ai/anchoring.py +130 -0
- package/operate/ai/client.py +13 -0
- package/operate/ai/context.py +105 -0
- package/operate/ai/runner.py +197 -69
- package/operate/cli/__init__.py +1 -1
- package/operate/cli/commands/scan.py +3 -8
- package/operate/cli/commands/test.py +1 -1
- package/operate/cli/env.py +4 -20
- package/operate/cross_user_tester/persona_matrix.py +5 -1
- package/operate/devsecops/pipeline.py +5 -5
- package/operate/exploit/generator.py +5 -1
- package/operate/lsa_sarif/lsa_to_sarif.py +24 -2
- package/operate/lsa_sarif/sarif_findings.py +96 -0
- package/operate/remediator/runner.py +1 -5
- package/operate/remediator/strategies.py +1 -1
- package/operate/tests/test_ai_anchoring.py +184 -0
- package/operate/tests/test_cli_baseline.py +1 -9
- package/operate/tests/test_cli_env.py +8 -29
- package/operate/tests/test_cross_user_pipeline.py +2 -2
- package/operate/tests/test_exploit_and_virtual_patch.py +3 -3
- package/operate/tests/test_headless_ai.py +148 -1
- package/operate/tests/test_npm_package.py +2 -16
- package/operate/tests/test_sarif_from_scan.py +156 -0
- package/package.json +2 -4
- package/remediate/authz/README.md +1 -1
- package/remediate/authz/dotnet/src/Komagu.Security.Authorization/DefaultKomaguAuthorizationService.cs +1 -1
- package/remediate/authz/dotnet/src/Komagu.Security.Authorization/SecurityAuditEvent.cs +2 -2
- package/remediate/authz/golang/authz.go +1 -1
- package/remediate/authz/nodejs/src/service.js +1 -1
- package/remediate/authz/nodejs/tests/test-authz.js +1 -1
- package/remediate/authz/patcher.py +3 -4
- package/remediate/authz/python/komagu_authz/models.py +2 -2
- package/remediate/authz/python/tests/test_fastapi_adapter.py +1 -1
- package/remediate/authz/python/tests/test_fastapi_d5_crosstest.py +1 -1
- package/remediate/authz/python/tests/test_python_authz.py +3 -3
- package/remediate/authz/spring/src/main/kotlin/io/komagu/security/authorization/DefaultKomaguSecurityManager.kt +1 -1
- package/remediate/authz/spring/src/main/kotlin/io/komagu/security/authorization/SecurityAuditEvent.kt +1 -2
- package/remediate/authz/tests/test_bola_patcher.py +1 -1
- package/remediate/edge/coraza/rules/coraza-crs-custom.conf +3 -4
- package/remediate/edge/coraza/virtual_patcher.py +4 -6
- package/remediate/edge/docker-compose.yml +1 -1
- package/remediate/ekyc/server/jpki_verifier.py +2 -8
- package/remediate/ekyc/server/tokenization.py +2 -8
- package/remediate/identity/README.md +5 -5
- package/remediate/identity/dotnet/src/Komagu.Security.Identity/KomaguOidcOptions.cs +2 -2
- package/remediate/identity/dotnet/tests/Komagu.Security.Identity.Tests/TestTokenGenerator.cs +1 -1
- package/remediate/identity/dotnet/tests/Komagu.Security.Identity.Tests/TokenValidationTests.cs +1 -1
- package/remediate/identity/python/komagu_identity/oidc_validator.py +2 -8
- package/remediate/identity/python/tests/test_oidc_validator.py +1 -1
- package/remediate/identity/spring/src/main/kotlin/io/komagu/security/identity/KomaguOidcProperties.kt +2 -2
- package/remediate/identity/spring/src/test/kotlin/io/komagu/security/identity/KomaguIdentityAutoConfigurationTest.kt +2 -2
- package/remediate/identity/spring/src/test/kotlin/io/komagu/security/identity/TestJwtFactory.kt +1 -1
- package/remediate/identity/spring/src/test/kotlin/io/komagu/security/identity/TokenValidationIntegrationTest.kt +1 -1
- package/remediate/identity/test-env/realm-komagu.json +1 -1
- package/remediate/legacy_shims/coldfusion/KomaguSecurityShim.cfc +5 -5
- package/remediate/query/README.md +1 -1
- package/remediate/query/dotnet/src/Komagu.Security.Query.Analyzers/DiagnosticIds.cs +1 -1
- package/remediate/query/dotnet/src/Komagu.Security.Query.Analyzers/Komagu.Security.Query.Analyzers.csproj +1 -1
- package/remediate/query/spring/src/main/kotlin/io/komagu/security/query/detekt/KomaguRuleSetProvider.kt +1 -1
- package/remediate/resilience/dr/dr_manager.py +2 -8
- package/remediate/resilience/dr/runbook.md +2 -2
- package/remediate/resilience/terraform/variables.tf +1 -1
- package/remediate/tenancy/audit/audit_trail.py +2 -8
- package/remediate/tenancy/crypto/byok_manager.py +2 -8
- package/remediate/tenancy/middleware/tenant_context.py +2 -8
- package/remediate/tenancy/sql/rls_isolation.sql +11 -11
- package/remediate/tenancy/sql/schema_per_tenant.sql +7 -7
- package/remediate/tenancy/test_sql_postgres.py +1 -1
- package/remediate/tenancy/tests/test_tenancy.py +4 -4
- package/bin/komainu +0 -16
- package/bin/komainu-legacy.js +0 -16
- package/remediate/ekyc/tests/test_legacy_env.py +0 -33
- package/remediate/identity/python/tests/test_legacy_env.py +0 -33
- package/remediate/identity/spring/src/main/kotlin/io/komagu/security/identity/LegacyKomainuPropertiesPostProcessor.kt +0 -60
- package/remediate/identity/spring/src/main/resources/META-INF/spring.factories +0 -2
- package/remediate/identity/spring/src/test/kotlin/io/komagu/security/identity/LegacyKomainuPropertiesPostProcessorTest.kt +0 -86
- package/remediate/resilience/tests/test_legacy_env.py +0 -33
- package/remediate/tenancy/tests/test_legacy_env.py +0 -49
|
@@ -0,0 +1,1911 @@
|
|
|
1
|
+
# Security Audit Report — repo
|
|
2
|
+
|
|
3
|
+
> **Classification: CONFIDENTIAL.** AI-assisted static review. All findings require human review (record decisions in `review-log.md`, created from `templates/review-log.md`) before they are shared outside the team.
|
|
4
|
+
|
|
5
|
+
| Item | Value |
|
|
6
|
+
|---|---|
|
|
7
|
+
| Date | 2026-10-31 |
|
|
8
|
+
| Kit version | 0.3.1 |
|
|
9
|
+
| Scope | BOLA/IDOR; SQL/HQL/NoSQL queries built from input; BFLA (missing role checks); mass assignment |
|
|
10
|
+
| Stacks | php, php-codeigniter, php-laravel, java-servlet, java-jsp, java-struts1, java-spring-mvc, java-mybatis, java-hibernate, dotnet-webforms, dotnet-handlers, dotnet-mvc, classic-asp, perl-cgi, coldfusion, node-express, python-flask, sql-procedures |
|
|
11
|
+
| Endpoints inventoried | 74 (candidates: 74) |
|
|
12
|
+
| Endpoints audited for BOLA | 74 |
|
|
13
|
+
| Injection candidates reviewed | 38 |
|
|
14
|
+
| Privileged routes audited for BFLA | 0 |
|
|
15
|
+
| Mass assignment candidates reviewed | 15 |
|
|
16
|
+
|
|
17
|
+
## 1. Executive summary
|
|
18
|
+
|
|
19
|
+
<!-- LLM: reporter agent writes max 8 bullets here -->
|
|
20
|
+
|
|
21
|
+
## 2. Findings overview
|
|
22
|
+
|
|
23
|
+
| Severity | critical | high | medium | low | info |
|
|
24
|
+
|---|---|---|---|---|---|
|
|
25
|
+
| Count | 51 | 45 | 0 | 0 | 0 |
|
|
26
|
+
|
|
27
|
+
| Category | Count |
|
|
28
|
+
|---|---|
|
|
29
|
+
| bola | 45 |
|
|
30
|
+
| sql_injection | 30 |
|
|
31
|
+
| nosql_injection | 1 |
|
|
32
|
+
| bfla | 12 |
|
|
33
|
+
| mass_assignment | 8 |
|
|
34
|
+
|
|
35
|
+
Status: unverified=0, confirmed=41, likely=55, rejected=1, needs_review=0
|
|
36
|
+
|
|
37
|
+
## Trend and time to fix
|
|
38
|
+
|
|
39
|
+
| Date | Open | New | Regressed | Fixed | Suppressed |
|
|
40
|
+
|---|---|---|---|---|---|
|
|
41
|
+
| 2026-10-31 | 96 | 96 | 0 | 0 | 0 |
|
|
42
|
+
|
|
43
|
+
No findings fixed yet.
|
|
44
|
+
|
|
45
|
+
## 3. Findings
|
|
46
|
+
|
|
47
|
+
| ID | Sev | Conf | Status | Category | Endpoint | Location | Title |
|
|
48
|
+
|---|---|---|---|---|---|---|---|
|
|
49
|
+
| BFLA-R-0003-1 | critical | medium | likely | bfla | | `classic-asp/shop/member.asp:1` | Unrestricted member deletion in classic‑ASP |
|
|
50
|
+
| BFLA-R-0007-1 | critical | medium | likely | bfla | | `Web/Controllers/AdminController.cs:1` | Unauthenticated user can delete any user in ASP.NET MVC |
|
|
51
|
+
| BFLA-R-0009-1 | critical | medium | likely | bfla | | `Web/Controllers/AdminController.cs:1` | Export endpoint controlled by request parameter in ASP.NET MVC |
|
|
52
|
+
| BFLA-R-0023-1 | critical | medium | likely | bfla | | `com/acme/web/AdminUserController.java:1` | Unprotected user deletion in Spring MVC |
|
|
53
|
+
| BFLA-R-0030-1 | critical | medium | likely | bfla | | `routes.js:1` | Unprotected user deletion in Express.js |
|
|
54
|
+
| BFLA-R-0032-1 | critical | medium | likely | bfla | | `routes.js:1` | Export endpoint controlled by query param in Express.js |
|
|
55
|
+
| BFLA-R-0057-1 | critical | high | confirmed | bfla | | `php-plain/admin.php:1` | Unprotected user view in PHP plain |
|
|
56
|
+
| BFLA-R-0058-1 | critical | high | confirmed | bfla | | `php-plain/admin.php:1` | Unprotected user deletion in PHP plain |
|
|
57
|
+
| BFLA-R-0059-1 | critical | high | confirmed | bfla | | `php-plain/manage_users.php:1` | Client‑side role check only in PHP plain |
|
|
58
|
+
| BFLA-R-0063-1 | critical | high | confirmed | bfla | | `php-plain/profile.php:1` | Privilege escalation via role field in PHP plain profile update |
|
|
59
|
+
| BFLA-R-0066-1 | critical | high | confirmed | bfla | | `php-plain/admin/delete_user.php:1` | Unprotected user deletion in PHP plain |
|
|
60
|
+
| BFLA-R-0067-1 | critical | high | confirmed | bfla | | `php-plain/admin/promote.php:1` | Privilege escalation via role promotion in PHP plain |
|
|
61
|
+
| INJ-I-0001 | critical | high | confirmed | sql_injection | | `classic-asp/shop/member.asp:6` | SQL Injection in classic-asp/shop/member.asp:6 |
|
|
62
|
+
| INJ-I-0002 | critical | high | confirmed | sql_injection | | `classic-asp/shop/member.asp:7` | SQL Injection in classic-asp/shop/member.asp:7 |
|
|
63
|
+
| INJ-I-0003 | critical | high | confirmed | sql_injection | | `classic-asp/shop/member.asp:10` | SQL Injection in classic-asp/shop/member.asp:10 |
|
|
64
|
+
| INJ-I-0004 | critical | high | confirmed | sql_injection | | `classic-asp/shop/order.asp:6` | SQL Injection in classic-asp/shop/order.asp:6 |
|
|
65
|
+
| INJ-I-0006 | critical | high | confirmed | sql_injection | | `coldfusion/app/OrderService.cfc:5` | SQL Injection in coldfusion/app/OrderService.cfc:5 |
|
|
66
|
+
| INJ-I-0007 | critical | high | confirmed | sql_injection | | `coldfusion/app/order.cfm:3` | SQL Injection in coldfusion/app/order.cfm:3 |
|
|
67
|
+
| INJ-I-0008 | critical | medium | likely | sql_injection | | `dotnet-legacy/Web/Controllers/InvoiceController.cs:28` | SQL Injection in dotnet-legacy/Web/Controllers/InvoiceController.cs:28 |
|
|
68
|
+
| INJ-I-0009 | critical | high | confirmed | sql_injection | | `dotnet-legacy/Web/Orders/EditOrder.aspx.vb:7` | SQL Injection in dotnet-legacy/Web/Orders/EditOrder.aspx.vb:7 |
|
|
69
|
+
| INJ-I-0010 | critical | high | confirmed | sql_injection | | `dotnet-legacy/Web/Orders/EditOrder.aspx.vb:8` | SQL Injection in dotnet-legacy/Web/Orders/EditOrder.aspx.vb:8 |
|
|
70
|
+
| INJ-I-0011 | critical | high | confirmed | sql_injection | | `dotnet-legacy/Web/Orders/OrderDetail.aspx.cs:13` | SQL Injection in dotnet-legacy/Web/Orders/OrderDetail.aspx.cs:13 |
|
|
71
|
+
| INJ-I-0012 | critical | high | likely | sql_injection | | `dotnet-legacy/Web/Orders/OrderDetail.aspx.cs:19` | SQL Injection in dotnet-legacy/Web/Orders/OrderDetail.aspx.cs:19 |
|
|
72
|
+
| INJ-I-0013 | critical | high | likely | sql_injection | | `dotnet-legacy/Web/Orders/OrderDetail.aspx.cs:20` | SQL Injection in dotnet-legacy/Web/Orders/OrderDetail.aspx.cs:20 |
|
|
73
|
+
| INJ-I-0014 | critical | high | likely | sql_injection | | `java-legacy/WebContent/order/detail.jsp:5` | SQL Injection in java-legacy/WebContent/order/detail.jsp:5 |
|
|
74
|
+
| INJ-I-0015 | critical | medium | likely | sql_injection | | `java-legacy/src/com/acme/mapper/OrderMapper.xml:9` | SQL Injection in java-legacy/src/com/acme/mapper/OrderMapper.xml:9 |
|
|
75
|
+
| INJ-I-0016 | critical | high | likely | sql_injection | | `java-legacy/src/com/acme/struts/EditUserAction.java:13` | SQL Injection in java-legacy/src/com/acme/struts/EditUserAction.java:13 |
|
|
76
|
+
| INJ-I-0017 | critical | high | likely | sql_injection | | `java-legacy/src/com/acme/web/InvoiceController.java:29` | SQL Injection in java-legacy/src/com/acme/web/InvoiceController.java:29 |
|
|
77
|
+
| INJ-I-0018 | critical | medium | likely | sql_injection | | `java-legacy/src/com/acme/web/OrderServlet.java:15` | SQL Injection in java-legacy/src/com/acme/web/OrderServlet.java:15 |
|
|
78
|
+
| INJ-I-0020 | critical | high | confirmed | sql_injection | | `node-express/routes/orders.js:17` | SQL Injection in node-express/routes/orders.js:17 |
|
|
79
|
+
| INJ-I-0022 | critical | high | confirmed | sql_injection | | `node-express/routes/orders.js:21` | SQL Injection in node-express/routes/orders.js:21 |
|
|
80
|
+
| INJ-I-0023 | critical | high | confirmed | sql_injection | | `node-express/routes/orders.js:25` | SQL Injection in node-express/routes/orders.js:25 |
|
|
81
|
+
| INJ-I-0024 | critical | high | confirmed | sql_injection | | `perl-cgi/cgi-bin/order.cgi:13` | SQL Injection in perl-cgi/cgi-bin/order.cgi:13 |
|
|
82
|
+
| INJ-I-0025 | critical | high | confirmed | sql_injection | | `perl-cgi/cgi-bin/order.cgi:19` | SQL Injection in perl-cgi/cgi-bin/order.cgi:19 |
|
|
83
|
+
| INJ-I-0026 | critical | medium | likely | sql_injection | | `php-codeigniter/application/controllers/Invoice.php:10` | SQL Injection in php-codeigniter/application/controllers/Invoice.php:10 |
|
|
84
|
+
| INJ-I-0027 | critical | medium | likely | sql_injection | | `php-plain/admin.php:12` | SQL Injection in php-plain/admin.php:12 |
|
|
85
|
+
| INJ-I-0029 | critical | medium | likely | nosql_injection | | `php-plain/mongo_find.php:6` | NoSQL Injection in php-plain/mongo_find.php:6 |
|
|
86
|
+
| INJ-I-0031 | critical | medium | likely | sql_injection | | `php-plain/order_detail.php:6` | SQL Injection in php-plain/order_detail.php:6 |
|
|
87
|
+
| INJ-I-0032 | critical | medium | likely | sql_injection | | `php-plain/search.php:8` | SQL Injection in php-plain/search.php:8 |
|
|
88
|
+
| INJ-I-0033 | critical | medium | likely | sql_injection | | `php-plain/search.php:9` | SQL Injection in php-plain/search.php:9 |
|
|
89
|
+
| INJ-I-0034 | critical | medium | likely | sql_injection | | `php-plain/search.php:14` | SQL Injection in php-plain/search.php:14 |
|
|
90
|
+
| INJ-I-0036 | critical | medium | likely | sql_injection | | `python-flask/app.py:29` | SQL Injection in python-flask/app.py:29 |
|
|
91
|
+
| INJ-I-0037 | critical | medium | likely | sql_injection | | `sql-procs/sp_search_orders.sql:5` | SQL Injection in sql-procs/sp_search_orders.sql:5 |
|
|
92
|
+
| MASS-M-0006-1 | critical | medium | likely | mass_assignment | | `routes/profile.js:7` | Profile update binds entire request body to User model |
|
|
93
|
+
| MASS-M-0008-1 | critical | medium | likely | mass_assignment | | `app/Http/Controllers/AccountController.php:11` | User registration binds entire request body to User model |
|
|
94
|
+
| MASS-M-0009-1 | critical | medium | likely | mass_assignment | | `app/Http/Controllers/AccountController.php:21` | Team creation allows setting owner_id via request body |
|
|
95
|
+
| MASS-M-0011-1 | critical | high | confirmed | mass_assignment | | `php-plain/profile.php:1` | Unrestricted binding of all POST fields to User in PHP plain |
|
|
96
|
+
| MASS-M-0012-1 | critical | high | confirmed | mass_assignment | | `php-plain/profile.php:1` | Privilege escalation via role field in PHP plain |
|
|
97
|
+
| MASS-M-0013-1 | critical | medium | likely | mass_assignment | | `register.php:4` | User insertion uses extract($_POST) to bind all POST fields |
|
|
98
|
+
| MASS-M-0014-1 | critical | medium | likely | mass_assignment | | `app.py:8` | User creation binds entire request JSON to User model |
|
|
99
|
+
| MASS-M-0015-1 | critical | medium | likely | mass_assignment | | `app.py:24` | PATCH endpoint sets arbitrary attributes from request JSON |
|
|
100
|
+
| BOLA-R-0001-1 | high | medium | likely | bola | POST /user/edit.do | `java-legacy/src/com/acme/struts/EditUserAction.java:13` | BOLA in POST /user/edit.do: missing owner verification |
|
|
101
|
+
| BOLA-R-0002-1 | high | medium | likely | bola | POST /classic-asp/shop/member.asp?mode=edit | `classic-asp/shop/member.asp:6` | BOLA in POST /classic-asp/shop/member.asp?mode=edit: missing owner verification |
|
|
102
|
+
| BOLA-R-0003-1 | high | medium | likely | bola | DELETE /classic-asp/shop/member.asp?mode=delete | `classic-asp/shop/member.asp:10` | BOLA in DELETE /classic-asp/shop/member.asp?mode=delete: missing owner verification |
|
|
103
|
+
| BOLA-R-0004-1 | high | medium | likely | bola | GET /classic-asp/shop/order.asp | `classic-asp/shop/order.asp:5` | BOLA in GET /classic-asp/shop/order.asp: missing owner verification |
|
|
104
|
+
| BOLA-R-0005-1 | high | medium | likely | bola | GET /coldfusion/app/OrderService.cfc?method=getOrder | `coldfusion/app/OrderService.cfc:4` | BOLA in GET /coldfusion/app/OrderService.cfc?method=getOrder: missing owner verification |
|
|
105
|
+
| BOLA-R-0006-1 | high | medium | likely | bola | GET /coldfusion/app/order.cfm | `coldfusion/app/order.cfm:3` | BOLA in GET /coldfusion/app/order.cfm: missing owner verification |
|
|
106
|
+
| BOLA-R-0007-1 | high | medium | likely | bola | POST /Admin/DeleteUser | `dotnet-legacy/Web/Controllers/AdminController.cs:12` | BOLA in POST /Admin/DeleteUser: missing owner verification |
|
|
107
|
+
| BOLA-R-0008-1 | high | medium | likely | bola | POST /Admin/Export | `dotnet-legacy/Web/Controllers/AdminController.cs:32` | BOLA in POST /Admin/Export: missing role verification |
|
|
108
|
+
| BOLA-R-0009-1 | high | medium | likely | bola | POST /Admin/Export | `dotnet-legacy/Web/Controllers/AdminController.cs:32` | BOLA in POST /Admin/Export: missing role verification |
|
|
109
|
+
| BOLA-R-0010 | high | high | confirmed | bola | POST /Customer/Edit | `dotnet-legacy/Web/Controllers/CustomerController.cs:12` | BOLA in POST /Customer/Edit: missing owner verification |
|
|
110
|
+
| BOLA-R-0011 | high | high | confirmed | bola | POST /Customer/EditName | `dotnet-legacy/Web/Controllers/CustomerController.cs:20` | BOLA in POST /Customer/EditName: missing owner verification |
|
|
111
|
+
| BOLA-R-0012 | high | high | confirmed | bola | POST /Customer/Refresh | `dotnet-legacy/Web/Controllers/CustomerController.cs:27` | BOLA in POST /Customer/Refresh: missing owner verification |
|
|
112
|
+
| BOLA-R-0013-1 | high | medium | likely | bola | GET /Invoice/Details | `dotnet-legacy/Web/Controllers/InvoiceController.cs:13` | BOLA in GET /Invoice/Details: missing owner verification |
|
|
113
|
+
| BOLA-R-0014-1 | high | medium | likely | bola | GET /Invoice/Details | `dotnet-legacy/Web/Controllers/InvoiceController.cs:13` | BOLA in GET /Invoice/Details: missing owner verification |
|
|
114
|
+
| BOLA-R-0015-1 | high | medium | likely | bola | POST /Invoice/Search | `dotnet-legacy/Web/Controllers/InvoiceController.cs:28` | BOLA in POST /Invoice/Search: missing owner verification |
|
|
115
|
+
| BOLA-R-0016 | high | medium | likely | bola | ANY /dotnet-legacy/Web/Handlers/GetFile.ashx | `dotnet-legacy/Web/Handlers/GetFile.ashx:8` | BOLA in ANY /dotnet-legacy/Web/Handlers/GetFile.ashx: missing owner verification |
|
|
116
|
+
| BOLA-R-0017-1 | high | medium | likely | bola | POST /dotnet-legacy/Web/Orders/EditOrder.aspx | `dotnet-legacy/Web/Orders/EditOrder.aspx.vb:7` | BOLA in POST /dotnet-legacy/Web/Orders/EditOrder.aspx: missing owner verification |
|
|
117
|
+
| BOLA-R-0018-1 | high | medium | likely | bola | GET /dotnet-legacy/Web/Orders/OrderDetail.aspx | `dotnet-legacy/Web/Orders/OrderDetail.aspx.cs:13` | BOLA in GET /dotnet-legacy/Web/Orders/OrderDetail.aspx: missing owner verification |
|
|
118
|
+
| BOLA-R-0019-1 | high | medium | likely | bola | GET /java-legacy/WebContent/order/detail.jsp | `java-legacy/WebContent/order/detail.jsp:5` | BOLA in GET /java-legacy/WebContent/order/detail.jsp: missing owner verification |
|
|
119
|
+
| BOLA-R-0020 | high | high | confirmed | bola | POST /account/save | `java-legacy/src/com/acme/web/AccountController.java:15` | BOLA in POST /account/save: missing owner verification |
|
|
120
|
+
| BOLA-R-0021 | high | high | confirmed | bola | POST /account/rename | `java-legacy/src/com/acme/web/AccountController.java:21` | BOLA in POST /account/rename: missing owner verification |
|
|
121
|
+
| BOLA-R-0022 | high | high | confirmed | bola | PUT /account/api | `java-legacy/src/com/acme/web/AccountController.java:28` | BOLA in PUT /account/api: missing owner verification |
|
|
122
|
+
| BOLA-R-0023 | high | high | confirmed | bola | POST /admin/users/{id}/delete | `java-legacy/src/com/acme/web/AdminUserController.java:15` | BOLA in POST /admin/users/{id}/delete: missing owner verification |
|
|
123
|
+
| BOLA-R-0025 | high | high | confirmed | bola | GET /invoices/{id} | `java-legacy/src/com/acme/web/InvoiceController.java:17` | BOLA in GET /invoices/{id}: missing owner verification |
|
|
124
|
+
| BOLA-R-0027 | high | medium | likely | bola | GET /invoices/search | `java-legacy/src/com/acme/web/InvoiceController.java:29` | BOLA in GET /invoices/search: missing owner verification |
|
|
125
|
+
| BOLA-R-0028 | high | medium | likely | bola | GET /order/view | `java-legacy/src/com/acme/web/OrderServlet.java:15` | BOLA in GET /order/view: missing owner verification |
|
|
126
|
+
| BOLA-R-0030 | high | medium | likely | bola | POST /admin/users/:id/delete | `node-express/routes/admin.js:9` | BOLA in POST /admin/users/:id/delete: missing owner verification |
|
|
127
|
+
| BOLA-R-0033-1 | high | medium | likely | bola | GET /orders/:id | `node-express/routes/orders.js:8` | BOLA in GET /orders/:id: missing owner verification |
|
|
128
|
+
| BOLA-R-0038-1 | high | medium | likely | bola | GET /stats | `node-express/routes/orders.js:28` | BOLA in GET /stats: missing shop ownership verification |
|
|
129
|
+
| BOLA-R-0043-1 | high | high | confirmed | bola | ANY /perl-cgi/cgi-bin/order.cgi | `perl-cgi/cgi-bin/order.cgi:11` | BOLA in Perl CGI order.cgi: missing user ownership verification |
|
|
130
|
+
| BOLA-R-0044-1 | high | high | confirmed | bola | ANY /invoice/view/{id} | `php-codeigniter/application/controllers/Invoice.php:9` | BOLA in PHP CodeIgniter Invoice view: missing owner verification |
|
|
131
|
+
| BOLA-R-0046-1 | high | high | confirmed | bola | ANY /invoice/update | `php-codeigniter/application/controllers/Invoice.php:20` | BOLA in PHP CodeIgniter Invoice update: missing owner verification |
|
|
132
|
+
| BOLA-R-0053 | high | medium | likely | bola | POST /posts | `php-laravel/routes/web.php:7` | Needs review: POST /posts – ownership check unknown |
|
|
133
|
+
| BOLA-R-0054 | high | medium | likely | bola | POST /teams | `php-laravel/routes/web.php:8` | Needs review: POST /teams – ownership check unknown |
|
|
134
|
+
| BOLA-R-0055 | high | medium | likely | bola | POST /account/rename | `php-laravel/routes/web.php:9` | Needs review: POST /account/rename – ownership check unknown |
|
|
135
|
+
| BOLA-R-0056 | high | medium | likely | bola | POST /account/profile | `php-laravel/routes/web.php:10` | Needs review: POST /account/profile – ownership check unknown |
|
|
136
|
+
| BOLA-R-0057 | high | high | confirmed | bola | GET\|POST /php-plain/admin.php?action=view | `php-plain/admin.php:6` | BOLA in GET\|POST /php-plain/admin.php?action=view: missing owner verification |
|
|
137
|
+
| BOLA-R-0058 | high | high | confirmed | bola | GET\|POST /php-plain/admin.php?action=delete | `php-plain/admin.php:10` | BOLA in GET\|POST /php-plain/admin.php?action=delete: missing owner verification |
|
|
138
|
+
| BOLA-R-0059 | high | high | confirmed | bola | POST /php-plain/manage_users.php | `php-plain/manage_users.php:5` | BOLA in POST /php-plain/manage_users.php: missing owner verification |
|
|
139
|
+
| BOLA-R-0061 | high | high | confirmed | bola | GET /php-plain/order_detail.php | `php-plain/order_detail.php:5` | BOLA in GET /php-plain/order_detail.php: missing owner verification |
|
|
140
|
+
| BOLA-R-0066 | high | high | confirmed | bola | POST /php-plain/admin/delete_user.php | `php-plain/admin/delete_user.php:5` | BOLA in POST /php-plain/admin/delete_user.php: missing owner verification |
|
|
141
|
+
| BOLA-R-0067 | high | high | confirmed | bola | POST /php-plain/admin/promote.php | `php-plain/admin/promote.php:5` | BOLA in POST /php-plain/admin/promote.php: missing owner verification |
|
|
142
|
+
| BOLA-R-0069 | high | high | confirmed | bola | GET /orders/<int:order_id> | `python-flask/app.py:12` | BOLA in GET /orders/<int:order_id>: missing owner verification |
|
|
143
|
+
| BOLA-R-0073 | high | high | confirmed | bola | POST /users/<int:uid>/name | `python-flask/profile.py:16` | BOLA in POST /users/<int:uid>/name: missing owner verification |
|
|
144
|
+
| BOLA-R-0074 | high | medium | likely | bola | PATCH /users/<int:uid> | `python-flask/profile.py:24` | BOLA in PATCH /users/<int:uid>: missing owner verification |
|
|
145
|
+
|
|
146
|
+
### BFLA-R-0003-1 — Unrestricted member deletion in classic‑ASP
|
|
147
|
+
|
|
148
|
+
- **Severity / confidence:** critical / medium
|
|
149
|
+
- **Status:** likely
|
|
150
|
+
- **Category:** bfla (missing_role_check) — CWE-285
|
|
151
|
+
- **Endpoint:** - -
|
|
152
|
+
- **Location:** `classic-asp/shop/member.asp:1`
|
|
153
|
+
|
|
154
|
+
**Impact.** Any authenticated user can delete any member record.
|
|
155
|
+
|
|
156
|
+
**Evidence.**
|
|
157
|
+
|
|
158
|
+
- `classic-asp/shop/member.asp:10` — DELETE FROM members WHERE member_id = ... (privileged action, no role check)
|
|
159
|
+
- `classic-asp/shop/member.asp:9` — no role check before the delete
|
|
160
|
+
|
|
161
|
+
**Recommendation.** Add a server‑side check that the current user has admin privileges before executing the delete.
|
|
162
|
+
|
|
163
|
+
*Verifier:* likely — checked: classic-asp/shop/member.asp lines 1-12, included inc/auth.asp lines 1-3, included inc/conn.asp lines 1-4. The DELETE statement is executed without any role or ownership check. The included auth file only verifies authentication, not authorization.
|
|
164
|
+
|
|
165
|
+
### BFLA-R-0007-1 — Unauthenticated user can delete any user in ASP.NET MVC
|
|
166
|
+
|
|
167
|
+
- **Severity / confidence:** critical / medium
|
|
168
|
+
- **Status:** likely
|
|
169
|
+
- **Category:** bfla (missing_role_check) — CWE-285
|
|
170
|
+
- **Endpoint:** - -
|
|
171
|
+
- **Location:** `Web/Controllers/AdminController.cs:1`
|
|
172
|
+
|
|
173
|
+
**Impact.** Any authenticated user can delete any account.
|
|
174
|
+
|
|
175
|
+
**Evidence.**
|
|
176
|
+
|
|
177
|
+
- `Web/Controllers/AdminController.cs:14` — db.Users.Remove(u); (privileged action, no role check)
|
|
178
|
+
- `Web/Controllers/AdminController.cs:12` — no [Authorize(Roles="Admin")] on DeleteUser
|
|
179
|
+
|
|
180
|
+
**Recommendation.** Add [Authorize(Roles="Admin")] to DeleteUser or enforce role check in code.
|
|
181
|
+
|
|
182
|
+
*Verifier:* likely — checked: no code_context provided for Web/Controllers/AdminController.cs. The file containing the DeleteUser action is missing from the provided context, so no authorization check can be verified.
|
|
183
|
+
|
|
184
|
+
### BFLA-R-0009-1 — Export endpoint controlled by request parameter in ASP.NET MVC
|
|
185
|
+
|
|
186
|
+
- **Severity / confidence:** critical / medium
|
|
187
|
+
- **Status:** likely
|
|
188
|
+
- **Category:** bfla (role_from_request) — CWE-269, CWE-285
|
|
189
|
+
- **Endpoint:** - -
|
|
190
|
+
- **Location:** `Web/Controllers/AdminController.cs:1`
|
|
191
|
+
|
|
192
|
+
**Impact.** Any authenticated user can export all user data by setting isAdmin=true.
|
|
193
|
+
|
|
194
|
+
**Evidence.**
|
|
195
|
+
|
|
196
|
+
- `Web/Controllers/AdminController.cs:32` — if (Request.QueryString["isAdmin"] == "true") return Json(db.Users.ToList());
|
|
197
|
+
- `Web/Controllers/AdminController.cs:30` — no role check before the export
|
|
198
|
+
|
|
199
|
+
**Recommendation.** Validate the caller's role server‑side before returning the data.
|
|
200
|
+
|
|
201
|
+
*Verifier:* likely — checked: no code_context provided for Web/Controllers/AdminController.cs. The export endpoint code is not available; cannot confirm presence or absence of role validation.
|
|
202
|
+
|
|
203
|
+
### BFLA-R-0023-1 — Unprotected user deletion in Spring MVC
|
|
204
|
+
|
|
205
|
+
- **Severity / confidence:** critical / medium
|
|
206
|
+
- **Status:** likely
|
|
207
|
+
- **Category:** bfla (missing_role_check) — CWE-285
|
|
208
|
+
- **Endpoint:** - -
|
|
209
|
+
- **Location:** `com/acme/web/AdminUserController.java:1`
|
|
210
|
+
|
|
211
|
+
**Impact.** Any authenticated user can delete any user.
|
|
212
|
+
|
|
213
|
+
**Evidence.**
|
|
214
|
+
|
|
215
|
+
- `com/acme/web/AdminUserController.java:15` — userDao.deleteById(id); (privileged action, no role check)
|
|
216
|
+
- `com/acme/web/AdminUserController.java:13` — no @PreAuthorize on delete method
|
|
217
|
+
|
|
218
|
+
**Recommendation.** Add @PreAuthorize("hasRole('ADMIN')") to the delete method.
|
|
219
|
+
|
|
220
|
+
*Verifier:* likely — checked: no code_context provided for com/acme/web/AdminUserController.java. The controller file is missing from the context; no evidence of a role check is visible.
|
|
221
|
+
|
|
222
|
+
### BFLA-R-0030-1 — Unprotected user deletion in Express.js
|
|
223
|
+
|
|
224
|
+
- **Severity / confidence:** critical / medium
|
|
225
|
+
- **Status:** likely
|
|
226
|
+
- **Category:** bfla (missing_role_check) — CWE-285
|
|
227
|
+
- **Endpoint:** - -
|
|
228
|
+
- **Location:** `routes.js:1`
|
|
229
|
+
|
|
230
|
+
**Impact.** Any authenticated user can delete any user.
|
|
231
|
+
|
|
232
|
+
**Evidence.**
|
|
233
|
+
|
|
234
|
+
- `routes.js:9` — User.deleteOne({ _id: req.params.id }) (privileged action, no admin check)
|
|
235
|
+
- `routes.js:8` — ensureLoggedIn only, no requireAdmin
|
|
236
|
+
|
|
237
|
+
**Recommendation.** Add a server‑side admin check before the delete operation.
|
|
238
|
+
|
|
239
|
+
*Verifier:* likely — checked: routes.js not present in code_context. The code_context for routes.js is missing; no evidence of a role check or other compensating control can be examined.
|
|
240
|
+
|
|
241
|
+
### BFLA-R-0032-1 — Export endpoint controlled by query param in Express.js
|
|
242
|
+
|
|
243
|
+
- **Severity / confidence:** critical / medium
|
|
244
|
+
- **Status:** likely
|
|
245
|
+
- **Category:** bfla (role_from_request) — CWE-269, CWE-285
|
|
246
|
+
- **Endpoint:** - -
|
|
247
|
+
- **Location:** `routes.js:1`
|
|
248
|
+
|
|
249
|
+
**Impact.** Any authenticated user can export all users by setting isAdmin=true.
|
|
250
|
+
|
|
251
|
+
**Evidence.**
|
|
252
|
+
|
|
253
|
+
- `routes.js:17` — res.json([]) when req.query.isAdmin === 'true' (privileged action, no role check)
|
|
254
|
+
- `routes.js:16` — ensureLoggedIn only, no admin check
|
|
255
|
+
|
|
256
|
+
**Recommendation.** Validate the caller's role server‑side before returning data.
|
|
257
|
+
|
|
258
|
+
*Verifier:* likely — checked: routes.js not present in code_context. The code_context for routes.js is missing; no evidence of a role check or other compensating control can be examined.
|
|
259
|
+
|
|
260
|
+
### BFLA-R-0057-1 — Unprotected user view in PHP plain
|
|
261
|
+
|
|
262
|
+
- **Severity / confidence:** critical / high
|
|
263
|
+
- **Status:** confirmed
|
|
264
|
+
- **Category:** bfla (missing_role_check) — CWE-285
|
|
265
|
+
- **Endpoint:** - -
|
|
266
|
+
- **Location:** `php-plain/admin.php:1`
|
|
267
|
+
|
|
268
|
+
**Impact.** Any authenticated user can view any user record.
|
|
269
|
+
|
|
270
|
+
**Evidence.**
|
|
271
|
+
|
|
272
|
+
- `php-plain/admin.php:8` — SELECT * FROM users WHERE id = ... (privileged action, no role check)
|
|
273
|
+
- `php-plain/admin.php:6` — no role check before the query
|
|
274
|
+
|
|
275
|
+
**Recommendation.** Add a server‑side admin check before executing the query.
|
|
276
|
+
|
|
277
|
+
*Verifier:* confirmed — checked: php-plain/admin.php lines 1-14, php-plain/inc/auth.php lines 1-7. The script performs a SELECT on users by id without any admin or ownership check. Only a login check is present in inc/auth.php.
|
|
278
|
+
|
|
279
|
+
### BFLA-R-0058-1 — Unprotected user deletion in PHP plain
|
|
280
|
+
|
|
281
|
+
- **Severity / confidence:** critical / high
|
|
282
|
+
- **Status:** confirmed
|
|
283
|
+
- **Category:** bfla (missing_role_check) — CWE-285
|
|
284
|
+
- **Endpoint:** - -
|
|
285
|
+
- **Location:** `php-plain/admin.php:1`
|
|
286
|
+
|
|
287
|
+
**Impact.** Any authenticated user can delete any user.
|
|
288
|
+
|
|
289
|
+
**Evidence.**
|
|
290
|
+
|
|
291
|
+
- `php-plain/admin.php:12` — DELETE FROM users WHERE id = $id (privileged action, no role check)
|
|
292
|
+
- `php-plain/admin.php:10` — no role check before the delete
|
|
293
|
+
|
|
294
|
+
**Recommendation.** Add a server‑side admin check before executing the delete.
|
|
295
|
+
|
|
296
|
+
*Verifier:* confirmed — checked: php-plain/admin.php lines 1-14, php-plain/inc/auth.php lines 1-7. The DELETE statement is executed without any admin or ownership check. Only a login check is present in inc/auth.php.
|
|
297
|
+
|
|
298
|
+
### BFLA-R-0059-1 — Client‑side role check only in PHP plain
|
|
299
|
+
|
|
300
|
+
- **Severity / confidence:** critical / high
|
|
301
|
+
- **Status:** confirmed
|
|
302
|
+
- **Category:** bfla (client_side_role_check) — CWE-602, CWE-285
|
|
303
|
+
- **Endpoint:** - -
|
|
304
|
+
- **Location:** `php-plain/manage_users.php:1`
|
|
305
|
+
|
|
306
|
+
**Impact.** Any authenticated user can delete any user.
|
|
307
|
+
|
|
308
|
+
**Evidence.**
|
|
309
|
+
|
|
310
|
+
- `php-plain/manage_users.php:6` — DELETE FROM users WHERE id = ? (privileged action, no server‑side role check)
|
|
311
|
+
- `php-plain/manage_users.php:11` — role check only in HTML output, not in code
|
|
312
|
+
|
|
313
|
+
**Recommendation.** Add a server‑side admin check before executing the delete.
|
|
314
|
+
|
|
315
|
+
*Verifier:* confirmed — checked: php-plain/manage_users.php, php-plain/inc/auth.php. The DELETE statement is executed for any authenticated user. The only role check present is in the HTML output, which does not prevent the server from executing the delete. No server‑side admin check is visible.
|
|
316
|
+
|
|
317
|
+
### BFLA-R-0063-1 — Privilege escalation via role field in PHP plain profile update
|
|
318
|
+
|
|
319
|
+
- **Severity / confidence:** critical / high
|
|
320
|
+
- **Status:** confirmed
|
|
321
|
+
- **Category:** bfla (role_from_request) — CWE-915, CWE-269
|
|
322
|
+
- **Endpoint:** - -
|
|
323
|
+
- **Location:** `php-plain/profile.php:1`
|
|
324
|
+
|
|
325
|
+
**Impact.** Any authenticated user can change their role to admin.
|
|
326
|
+
|
|
327
|
+
**Evidence.**
|
|
328
|
+
|
|
329
|
+
- `php-plain/profile.php:6` — foreach ($_POST as $field => $value) { $user->$field = $value; } (whole object binding)
|
|
330
|
+
- `php-plain/profile.php:10` — $user->role = $_POST['role']; (privileged field)
|
|
331
|
+
- `php-plain/profile.php:11` — save_user($user); (writes role to DB)
|
|
332
|
+
|
|
333
|
+
**Recommendation.** Restrict binding to non‑privileged fields or set privileged fields server‑side.
|
|
334
|
+
|
|
335
|
+
*Verifier:* confirmed — checked: php-plain/profile.php, php-plain/inc/auth.php. The script binds all POST fields to the user object, including the privileged 'role' field, and then saves the user. No role or ownership check is present in the visible code.
|
|
336
|
+
|
|
337
|
+
### BFLA-R-0066-1 — Unprotected user deletion in PHP plain
|
|
338
|
+
|
|
339
|
+
- **Severity / confidence:** critical / high
|
|
340
|
+
- **Status:** confirmed
|
|
341
|
+
- **Category:** bfla (missing_role_check) — CWE-285
|
|
342
|
+
- **Endpoint:** - -
|
|
343
|
+
- **Location:** `php-plain/admin/delete_user.php:1`
|
|
344
|
+
|
|
345
|
+
**Impact.** Any authenticated user can delete any user.
|
|
346
|
+
|
|
347
|
+
**Evidence.**
|
|
348
|
+
|
|
349
|
+
- `php-plain/admin/delete_user.php:6` — DELETE FROM users WHERE id = ? (privileged action, no role check)
|
|
350
|
+
- `php-plain/admin/delete_user.php:1` — no role check before the delete
|
|
351
|
+
|
|
352
|
+
**Recommendation.** Add a server‑side admin check before executing the delete.
|
|
353
|
+
|
|
354
|
+
*Verifier:* confirmed — checked: php-plain/admin/delete_user.php lines 1-8, php-plain/inc/auth.php lines 1-7. The delete_user script performs a DELETE on users by id without any admin or ownership check. Only a login check is present in inc/auth.php.
|
|
355
|
+
|
|
356
|
+
### BFLA-R-0067-1 — Privilege escalation via role promotion in PHP plain
|
|
357
|
+
|
|
358
|
+
- **Severity / confidence:** critical / high
|
|
359
|
+
- **Status:** confirmed
|
|
360
|
+
- **Category:** bfla (role_from_request) — CWE-269, CWE-285
|
|
361
|
+
- **Endpoint:** - -
|
|
362
|
+
- **Location:** `php-plain/admin/promote.php:1`
|
|
363
|
+
|
|
364
|
+
**Impact.** Any authenticated user can promote themselves to admin.
|
|
365
|
+
|
|
366
|
+
**Evidence.**
|
|
367
|
+
|
|
368
|
+
- `php-plain/admin/promote.php:6` — UPDATE users SET role = 'admin' WHERE id = ... (privileged action, no role check)
|
|
369
|
+
- `php-plain/admin/promote.php:5` — role set from $_POST['is_admin'] (client‑side control)
|
|
370
|
+
- `php-plain/admin/promote.php:1` — no role check before the update
|
|
371
|
+
|
|
372
|
+
**Recommendation.** Validate the caller's role server‑side before allowing role changes.
|
|
373
|
+
|
|
374
|
+
*Verifier:* confirmed — checked: php-plain/admin/promote.php, php-plain/inc/auth.php. The code performs a role update based solely on a POST parameter and the user ID supplied in the request. The included auth.php only verifies that a session exists; it does not check that the current user is an administrator. No other role or ownership check is visible in the code context.
|
|
375
|
+
|
|
376
|
+
### INJ-I-0001 — SQL Injection in classic-asp/shop/member.asp:6
|
|
377
|
+
|
|
378
|
+
- **Severity / confidence:** critical / high
|
|
379
|
+
- **Status:** confirmed
|
|
380
|
+
- **Category:** sql_injection (string_concatenation) — CWE-89
|
|
381
|
+
- **Endpoint:** - -
|
|
382
|
+
- **Location:** `classic-asp/shop/member.asp:6`
|
|
383
|
+
|
|
384
|
+
**Evidence.**
|
|
385
|
+
|
|
386
|
+
- `classic-asp/shop/member.asp:6` — Unsanitized input concatenated into query
|
|
387
|
+
`sql = "UPDATE members SET name = '" & Replace(Request.Form("name"), "'", "''") & "'"`
|
|
388
|
+
- `classic-asp/shop/member.asp:7` — Unsanitized input concatenated into query
|
|
389
|
+
`sql = sql & " WHERE member_id = " & Request.Form("member_id")`
|
|
390
|
+
|
|
391
|
+
**Recommendation.** Use parameterized queries or stored procedures
|
|
392
|
+
|
|
393
|
+
*Verifier:* confirmed — checked: classic-asp/shop/member.asp:6-7, classic-asp/shop/inc/auth.asp:1-3, classic-asp/shop/inc/conn.asp:1-4. No ownership or role check is present; the UPDATE statement concatenates user input directly, enabling SQL injection.
|
|
394
|
+
|
|
395
|
+
### INJ-I-0002 — SQL Injection in classic-asp/shop/member.asp:7
|
|
396
|
+
|
|
397
|
+
- **Severity / confidence:** critical / high
|
|
398
|
+
- **Status:** confirmed
|
|
399
|
+
- **Category:** sql_injection (string_concatenation) — CWE-89
|
|
400
|
+
- **Endpoint:** - -
|
|
401
|
+
- **Location:** `classic-asp/shop/member.asp:7`
|
|
402
|
+
|
|
403
|
+
**Evidence.**
|
|
404
|
+
|
|
405
|
+
- `classic-asp/shop/member.asp:7` — Unsanitized input concatenated into query
|
|
406
|
+
`sql = sql & " WHERE member_id = " & Request.Form("member_id")`
|
|
407
|
+
|
|
408
|
+
**Recommendation.** Use parameterized queries or stored procedures
|
|
409
|
+
|
|
410
|
+
*Verifier:* confirmed — checked: classic-asp/shop/member.asp:6-7, classic-asp/shop/inc/auth.asp:1-3, classic-asp/shop/inc/conn.asp:1-4. The WHERE clause concatenates user input without any cast or ownership check, exposing the query to injection.
|
|
411
|
+
|
|
412
|
+
### INJ-I-0003 — SQL Injection in classic-asp/shop/member.asp:10
|
|
413
|
+
|
|
414
|
+
- **Severity / confidence:** critical / high
|
|
415
|
+
- **Status:** confirmed
|
|
416
|
+
- **Category:** sql_injection (string_concatenation) — CWE-89
|
|
417
|
+
- **Endpoint:** - -
|
|
418
|
+
- **Location:** `classic-asp/shop/member.asp:10`
|
|
419
|
+
|
|
420
|
+
**Evidence.**
|
|
421
|
+
|
|
422
|
+
- `classic-asp/shop/member.asp:10` — Unsanitized input concatenated into query
|
|
423
|
+
`conn.Execute "DELETE FROM members WHERE member_id = " & Request.QueryString("member_id")`
|
|
424
|
+
|
|
425
|
+
**Recommendation.** Use parameterized queries or stored procedures
|
|
426
|
+
|
|
427
|
+
*Verifier:* confirmed — checked: classic-asp/shop/member.asp:9-11, classic-asp/shop/inc/auth.asp:1-3, classic-asp/shop/inc/conn.asp:1-4. The DELETE statement uses unsanitized QueryString input directly; no ownership or role guard is applied.
|
|
428
|
+
|
|
429
|
+
### INJ-I-0004 — SQL Injection in classic-asp/shop/order.asp:6
|
|
430
|
+
|
|
431
|
+
- **Severity / confidence:** critical / high
|
|
432
|
+
- **Status:** confirmed
|
|
433
|
+
- **Category:** sql_injection (string_concatenation) — CWE-89
|
|
434
|
+
- **Endpoint:** - -
|
|
435
|
+
- **Location:** `classic-asp/shop/order.asp:6`
|
|
436
|
+
|
|
437
|
+
**Evidence.**
|
|
438
|
+
|
|
439
|
+
- `classic-asp/shop/order.asp:6` — Unsanitized input concatenated into query
|
|
440
|
+
`Set rs = conn.Execute("SELECT * FROM orders WHERE id = " & id)`
|
|
441
|
+
|
|
442
|
+
**Recommendation.** Use parameterized queries or stored procedures
|
|
443
|
+
|
|
444
|
+
*Verifier:* confirmed — checked: classic-asp/shop/order.asp:5-6, classic-asp/shop/inc/auth.asp:1-3, classic-asp/shop/inc/conn.asp:1-4. The SELECT query concatenates the id parameter directly; no cast or ownership check is present.
|
|
445
|
+
|
|
446
|
+
### INJ-I-0006 — SQL Injection in coldfusion/app/OrderService.cfc:5
|
|
447
|
+
|
|
448
|
+
- **Severity / confidence:** critical / high
|
|
449
|
+
- **Status:** confirmed
|
|
450
|
+
- **Category:** sql_injection (string_concatenation) — CWE-89
|
|
451
|
+
- **Endpoint:** - -
|
|
452
|
+
- **Location:** `coldfusion/app/OrderService.cfc:5`
|
|
453
|
+
|
|
454
|
+
**Evidence.**
|
|
455
|
+
|
|
456
|
+
- `coldfusion/app/OrderService.cfc:5` — Unsanitized input concatenated into query
|
|
457
|
+
`SELECT * FROM orders WHERE id = #arguments.orderId#`
|
|
458
|
+
|
|
459
|
+
**Recommendation.** Use <cfqueryparam> or stored procedures
|
|
460
|
+
|
|
461
|
+
*Verifier:* confirmed — checked: coldfusion/app/OrderService.cfc line 5. The query concatenates the unsanitized argument directly into the SQL string with no parameter binding, cast, or ownership check.
|
|
462
|
+
|
|
463
|
+
### INJ-I-0007 — SQL Injection in coldfusion/app/order.cfm:3
|
|
464
|
+
|
|
465
|
+
- **Severity / confidence:** critical / high
|
|
466
|
+
- **Status:** confirmed
|
|
467
|
+
- **Category:** sql_injection (string_concatenation) — CWE-89
|
|
468
|
+
- **Endpoint:** - -
|
|
469
|
+
- **Location:** `coldfusion/app/order.cfm:3`
|
|
470
|
+
|
|
471
|
+
**Evidence.**
|
|
472
|
+
|
|
473
|
+
- `coldfusion/app/order.cfm:3` — Unsanitized input concatenated into query
|
|
474
|
+
`SELECT * FROM orders WHERE id = #url.id#`
|
|
475
|
+
|
|
476
|
+
**Recommendation.** Use <cfqueryparam> or stored procedures
|
|
477
|
+
|
|
478
|
+
*Verifier:* confirmed — checked: coldfusion/app/order.cfm line 3. The first query uses the unsanitized URL parameter directly; no parameter binding or ownership check is present.
|
|
479
|
+
|
|
480
|
+
### INJ-I-0008 — SQL Injection in dotnet-legacy/Web/Controllers/InvoiceController.cs:28
|
|
481
|
+
|
|
482
|
+
- **Severity / confidence:** critical / medium
|
|
483
|
+
- **Status:** likely
|
|
484
|
+
- **Category:** sql_injection (string_concatenation) — CWE-89
|
|
485
|
+
- **Endpoint:** - -
|
|
486
|
+
- **Location:** `dotnet-legacy/Web/Controllers/InvoiceController.cs:28`
|
|
487
|
+
|
|
488
|
+
**Evidence.**
|
|
489
|
+
|
|
490
|
+
- `dotnet-legacy/Web/Controllers/InvoiceController.cs:28` — Unsanitized input concatenated into query
|
|
491
|
+
`var list = db.Database.SqlQuery<Invoice>("SELECT * FROM Invoices WHERE Customer = '" + customer + "'").ToList();`
|
|
492
|
+
|
|
493
|
+
**Recommendation.** Use parameterized queries
|
|
494
|
+
|
|
495
|
+
*Verifier:* likely — checked: dotnet-legacy/Web/Controllers/InvoiceController.cs:26-28. The Search action concatenates the 'customer' parameter into a raw SQL string; no parameterization or ownership check is shown in the context.
|
|
496
|
+
|
|
497
|
+
### INJ-I-0009 — SQL Injection in dotnet-legacy/Web/Orders/EditOrder.aspx.vb:7
|
|
498
|
+
|
|
499
|
+
- **Severity / confidence:** critical / high
|
|
500
|
+
- **Status:** confirmed
|
|
501
|
+
- **Category:** sql_injection (string_concatenation) — CWE-89
|
|
502
|
+
- **Endpoint:** - -
|
|
503
|
+
- **Location:** `dotnet-legacy/Web/Orders/EditOrder.aspx.vb:7`
|
|
504
|
+
|
|
505
|
+
**Evidence.**
|
|
506
|
+
|
|
507
|
+
- `dotnet-legacy/Web/Orders/EditOrder.aspx.vb:7` — Unsanitized input concatenated into query
|
|
508
|
+
`Dim sql As String = "UPDATE Orders SET Note = '" & txtNote.Text & "'"`
|
|
509
|
+
- `dotnet-legacy/Web/Orders/EditOrder.aspx.vb:8` — Unsanitized input concatenated into query
|
|
510
|
+
`sql &= " WHERE OrderId = " & hfOrderId.Value`
|
|
511
|
+
|
|
512
|
+
**Recommendation.** Use SqlCommand with parameters
|
|
513
|
+
|
|
514
|
+
*Verifier:* confirmed — checked: dotnet-legacy/Web/Orders/EditOrder.aspx.vb lines 7-8. SQL is built by string concatenation with user input; no parameterization or ownership validation is shown.
|
|
515
|
+
|
|
516
|
+
### INJ-I-0010 — SQL Injection in dotnet-legacy/Web/Orders/EditOrder.aspx.vb:8
|
|
517
|
+
|
|
518
|
+
- **Severity / confidence:** critical / high
|
|
519
|
+
- **Status:** confirmed
|
|
520
|
+
- **Category:** sql_injection (string_concatenation) — CWE-89
|
|
521
|
+
- **Endpoint:** - -
|
|
522
|
+
- **Location:** `dotnet-legacy/Web/Orders/EditOrder.aspx.vb:8`
|
|
523
|
+
|
|
524
|
+
**Evidence.**
|
|
525
|
+
|
|
526
|
+
- `dotnet-legacy/Web/Orders/EditOrder.aspx.vb:8` — Unsanitized input concatenated into query
|
|
527
|
+
`sql &= " WHERE OrderId = " & hfOrderId.Value`
|
|
528
|
+
|
|
529
|
+
**Recommendation.** Use SqlCommand with parameters
|
|
530
|
+
|
|
531
|
+
*Verifier:* confirmed — checked: dotnet-legacy/Web/Orders/EditOrder.aspx.vb line 8. The query concatenates the hidden field value directly; no parameter binding or ownership check is present.
|
|
532
|
+
|
|
533
|
+
### INJ-I-0011 — SQL Injection in dotnet-legacy/Web/Orders/OrderDetail.aspx.cs:13
|
|
534
|
+
|
|
535
|
+
- **Severity / confidence:** critical / high
|
|
536
|
+
- **Status:** confirmed
|
|
537
|
+
- **Category:** sql_injection (string_concatenation) — CWE-89
|
|
538
|
+
- **Endpoint:** - -
|
|
539
|
+
- **Location:** `dotnet-legacy/Web/Orders/OrderDetail.aspx.cs:13`
|
|
540
|
+
|
|
541
|
+
**Evidence.**
|
|
542
|
+
|
|
543
|
+
- `dotnet-legacy/Web/Orders/OrderDetail.aspx.cs:13` — Unsanitized input concatenated into query
|
|
544
|
+
`var cmd = new SqlCommand("SELECT * FROM Orders WHERE OrderId = " + id, conn);`
|
|
545
|
+
- `dotnet-legacy/Web/Orders/OrderDetail.aspx.cs:19` — Unsanitized input concatenated into query
|
|
546
|
+
`string sql2 = string.Format("SELECT * FROM Logs WHERE Ref = '{0}'", Request["ref"]);`
|
|
547
|
+
- `dotnet-legacy/Web/Orders/OrderDetail.aspx.cs:20` — Unsanitized input concatenated into query
|
|
548
|
+
`string sql3 = $"DELETE FROM Carts WHERE CartId = {Request.Form["cart"]}";`
|
|
549
|
+
|
|
550
|
+
**Recommendation.** Use SqlCommand with parameters
|
|
551
|
+
|
|
552
|
+
*Verifier:* confirmed — checked: dotnet-legacy/Web/Orders/OrderDetail.aspx.cs lines 13, 19, 20. All three queries are constructed via string concatenation or string.Format with unsanitized request data; no parameterization or ownership check is shown.
|
|
553
|
+
|
|
554
|
+
### INJ-I-0012 — SQL Injection in dotnet-legacy/Web/Orders/OrderDetail.aspx.cs:19
|
|
555
|
+
|
|
556
|
+
- **Severity / confidence:** critical / high
|
|
557
|
+
- **Status:** likely
|
|
558
|
+
- **Category:** sql_injection (string_concatenation) — CWE-89
|
|
559
|
+
- **Endpoint:** - -
|
|
560
|
+
- **Location:** `dotnet-legacy/Web/Orders/OrderDetail.aspx.cs:19`
|
|
561
|
+
|
|
562
|
+
**Evidence.**
|
|
563
|
+
|
|
564
|
+
- `dotnet-legacy/Web/Orders/OrderDetail.aspx.cs:19` — Unsanitized input concatenated into query
|
|
565
|
+
`string sql2 = string.Format("SELECT * FROM Logs WHERE Ref = '{0}'", Request["ref"]);`
|
|
566
|
+
|
|
567
|
+
**Recommendation.** Use parameterized queries
|
|
568
|
+
|
|
569
|
+
*Verifier:* likely — checked: dotnet-legacy/Web/Orders/OrderDetail.aspx.cs:19. The code concatenates Request["ref"] into a SQL string and executes it. No ownership or role check, integer cast, or allow‑list is visible in the provided snippet.
|
|
570
|
+
|
|
571
|
+
### INJ-I-0013 — SQL Injection in dotnet-legacy/Web/Orders/OrderDetail.aspx.cs:20
|
|
572
|
+
|
|
573
|
+
- **Severity / confidence:** critical / high
|
|
574
|
+
- **Status:** likely
|
|
575
|
+
- **Category:** sql_injection (string_concatenation) — CWE-89
|
|
576
|
+
- **Endpoint:** - -
|
|
577
|
+
- **Location:** `dotnet-legacy/Web/Orders/OrderDetail.aspx.cs:20`
|
|
578
|
+
|
|
579
|
+
**Evidence.**
|
|
580
|
+
|
|
581
|
+
- `dotnet-legacy/Web/Orders/OrderDetail.aspx.cs:20` — Unsanitized input concatenated into query
|
|
582
|
+
`string sql3 = $"DELETE FROM Carts WHERE CartId = {Request.Form["cart"]}";`
|
|
583
|
+
|
|
584
|
+
**Recommendation.** Use parameterized queries
|
|
585
|
+
|
|
586
|
+
*Verifier:* likely — checked: dotnet-legacy/Web/Orders/OrderDetail.aspx.cs:20. The code builds a DELETE statement using Request.Form["cart"] without sanitization or parameter binding. No compensating control is shown.
|
|
587
|
+
|
|
588
|
+
### INJ-I-0014 — SQL Injection in java-legacy/WebContent/order/detail.jsp:5
|
|
589
|
+
|
|
590
|
+
- **Severity / confidence:** critical / high
|
|
591
|
+
- **Status:** likely
|
|
592
|
+
- **Category:** sql_injection (string_concatenation) — CWE-89
|
|
593
|
+
- **Endpoint:** - -
|
|
594
|
+
- **Location:** `java-legacy/WebContent/order/detail.jsp:5`
|
|
595
|
+
|
|
596
|
+
**Evidence.**
|
|
597
|
+
|
|
598
|
+
- `java-legacy/WebContent/order/detail.jsp:5` — Unsanitized input concatenated into query
|
|
599
|
+
`ResultSet rs = c.createStatement().executeQuery("SELECT * FROM orders WHERE order_no = '" + no + "'");`
|
|
600
|
+
|
|
601
|
+
**Recommendation.** Use PreparedStatement with parameters
|
|
602
|
+
|
|
603
|
+
*Verifier:* likely — checked: java-legacy/WebContent/order/detail.jsp:5. The query concatenates the request parameter "no" directly into the SQL string. No ownership or role check, cast, or allow‑list is present in the snippet.
|
|
604
|
+
|
|
605
|
+
### INJ-I-0015 — SQL Injection in java-legacy/src/com/acme/mapper/OrderMapper.xml:9
|
|
606
|
+
|
|
607
|
+
- **Severity / confidence:** critical / medium
|
|
608
|
+
- **Status:** likely
|
|
609
|
+
- **Category:** sql_injection (dynamic_identifier) — CWE-89
|
|
610
|
+
- **Endpoint:** - -
|
|
611
|
+
- **Location:** `java-legacy/src/com/acme/mapper/OrderMapper.xml:9`
|
|
612
|
+
|
|
613
|
+
**Evidence.**
|
|
614
|
+
|
|
615
|
+
- `java-legacy/src/com/acme/mapper/OrderMapper.xml:9` — Dynamic identifier substituted without validation
|
|
616
|
+
`ORDER BY ${orderBy}`
|
|
617
|
+
|
|
618
|
+
**Recommendation.** Validate ORDER BY values against an allow‑list before substitution
|
|
619
|
+
|
|
620
|
+
*Verifier:* likely — checked: java-legacy/src/com/acme/mapper/OrderMapper.xml:7-9. The mapper XML contains a raw ORDER BY substitution without any visible allow‑list or parameter binding. No ownership or role check is present in the snippet.
|
|
621
|
+
|
|
622
|
+
### INJ-I-0016 — SQL Injection in java-legacy/src/com/acme/struts/EditUserAction.java:13
|
|
623
|
+
|
|
624
|
+
- **Severity / confidence:** critical / high
|
|
625
|
+
- **Status:** likely
|
|
626
|
+
- **Category:** sql_injection (string_concatenation) — CWE-89
|
|
627
|
+
- **Endpoint:** - -
|
|
628
|
+
- **Location:** `java-legacy/src/com/acme/struts/EditUserAction.java:13`
|
|
629
|
+
|
|
630
|
+
**Evidence.**
|
|
631
|
+
|
|
632
|
+
- `java-legacy/src/com/acme/struts/EditUserAction.java:13` — Unsanitized input concatenated into query
|
|
633
|
+
`PreparedStatement ps = conn.prepareStatement("UPDATE users SET email = '" + email + "' WHERE id = " + userId);`
|
|
634
|
+
|
|
635
|
+
**Recommendation.** Use PreparedStatement with parameters
|
|
636
|
+
|
|
637
|
+
*Verifier:* likely — checked: java-legacy/src/com/acme/struts/EditUserAction.java:13. The PreparedStatement is built by concatenating user input into the SQL string. No ownership or role check, cast, or allow‑list is visible.
|
|
638
|
+
|
|
639
|
+
### INJ-I-0017 — SQL Injection in java-legacy/src/com/acme/web/InvoiceController.java:29
|
|
640
|
+
|
|
641
|
+
- **Severity / confidence:** critical / high
|
|
642
|
+
- **Status:** likely
|
|
643
|
+
- **Category:** sql_injection (string_concatenation) — CWE-89
|
|
644
|
+
- **Endpoint:** - -
|
|
645
|
+
- **Location:** `java-legacy/src/com/acme/web/InvoiceController.java:29`
|
|
646
|
+
|
|
647
|
+
**Evidence.**
|
|
648
|
+
|
|
649
|
+
- `java-legacy/src/com/acme/web/InvoiceController.java:29` — Unsanitized input concatenated into query
|
|
650
|
+
`session.createQuery("from Invoice i where i.customer = '" + customer + "'").list();`
|
|
651
|
+
|
|
652
|
+
**Recommendation.** Use parameterized HQL queries
|
|
653
|
+
|
|
654
|
+
*Verifier:* likely — checked: java-legacy/src/com/acme/web/InvoiceController.java:29. The HQL query concatenates the "customer" request parameter directly. No ownership or role check, cast, or allow‑list is shown in the snippet.
|
|
655
|
+
|
|
656
|
+
### INJ-I-0018 — SQL Injection in java-legacy/src/com/acme/web/OrderServlet.java:15
|
|
657
|
+
|
|
658
|
+
- **Severity / confidence:** critical / medium
|
|
659
|
+
- **Status:** likely
|
|
660
|
+
- **Category:** sql_injection (string_concatenation) — CWE-89
|
|
661
|
+
- **Endpoint:** - -
|
|
662
|
+
- **Location:** `java-legacy/src/com/acme/web/OrderServlet.java:15`
|
|
663
|
+
|
|
664
|
+
**Evidence.**
|
|
665
|
+
|
|
666
|
+
- `java-legacy/src/com/acme/web/OrderServlet.java:15` — Unsanitized input concatenated into query
|
|
667
|
+
`ResultSet rs = stmt.executeQuery("SELECT * FROM orders WHERE id = '" + id + "'");`
|
|
668
|
+
- `java-legacy/src/com/acme/web/OrderServlet.java:17` — Unsanitized input concatenated into query
|
|
669
|
+
`sb.append(" AND order_id = ").append(id);`
|
|
670
|
+
|
|
671
|
+
**Recommendation.** Use PreparedStatement with bound parameters
|
|
672
|
+
|
|
673
|
+
*Verifier:* likely — checked: java-legacy/src/com/acme/web/OrderServlet.java:13-18. The servlet concatenates user input directly into SQL strings. No integer cast, allow‑list, or ownership check is shown in the snippet.
|
|
674
|
+
|
|
675
|
+
### INJ-I-0020 — SQL Injection in node-express/routes/orders.js:17
|
|
676
|
+
|
|
677
|
+
- **Severity / confidence:** critical / high
|
|
678
|
+
- **Status:** confirmed
|
|
679
|
+
- **Category:** sql_injection (string_concatenation) — CWE-89
|
|
680
|
+
- **Endpoint:** - -
|
|
681
|
+
- **Location:** `node-express/routes/orders.js:17`
|
|
682
|
+
|
|
683
|
+
**Evidence.**
|
|
684
|
+
|
|
685
|
+
- `node-express/routes/orders.js:17` — Unsanitized input concatenated into query
|
|
686
|
+
`db.query("SELECT * FROM reports WHERE month = '" + req.query.month + "'", function (e, rows) { res.json(rows); });`
|
|
687
|
+
- `node-express/routes/orders.js:29` — Unsanitized input concatenated into query
|
|
688
|
+
`db.query('SELECT COUNT(*) AS n FROM orders WHERE shop_id = ${req.query.shop}', function (e, r) { res.json(r); });`
|
|
689
|
+
|
|
690
|
+
**Recommendation.** Use parameterized queries or ORM
|
|
691
|
+
|
|
692
|
+
*Verifier:* confirmed — checked: node-express/routes/orders.js:17. The query concatenates the unsanitized req.query.month directly into the SQL string. No integer cast, allow‑list, or parameter binding is present in the visible code.
|
|
693
|
+
|
|
694
|
+
### INJ-I-0022 — SQL Injection in node-express/routes/orders.js:21
|
|
695
|
+
|
|
696
|
+
- **Severity / confidence:** critical / high
|
|
697
|
+
- **Status:** confirmed
|
|
698
|
+
- **Category:** sql_injection (string_concatenation) — CWE-89
|
|
699
|
+
- **Endpoint:** - -
|
|
700
|
+
- **Location:** `node-express/routes/orders.js:21`
|
|
701
|
+
|
|
702
|
+
**Evidence.**
|
|
703
|
+
|
|
704
|
+
- `node-express/routes/orders.js:21` — Unsanitized input used as query object
|
|
705
|
+
`db.collection('users').findOne(req.body, function (e, u) { res.json(!!u); });`
|
|
706
|
+
|
|
707
|
+
**Recommendation.** Validate and sanitize request body before using as query
|
|
708
|
+
|
|
709
|
+
*Verifier:* confirmed — checked: node-express/routes/orders.js:21. The request body is passed directly to db.collection('users').findOne without validation or sanitization, exposing the query to injection.
|
|
710
|
+
|
|
711
|
+
### INJ-I-0023 — SQL Injection in node-express/routes/orders.js:25
|
|
712
|
+
|
|
713
|
+
- **Severity / confidence:** critical / high
|
|
714
|
+
- **Status:** confirmed
|
|
715
|
+
- **Category:** sql_injection (operator_injection) — CWE-89
|
|
716
|
+
- **Endpoint:** - -
|
|
717
|
+
- **Location:** `node-express/routes/orders.js:25`
|
|
718
|
+
|
|
719
|
+
**Evidence.**
|
|
720
|
+
|
|
721
|
+
- `node-express/routes/orders.js:25` — Unsanitized input used in $where JavaScript expression
|
|
722
|
+
`db.collection('items').find({ $where: "this.name == '" + req.query.n + "'" }).toArray(function (e, r) { res.json(r); });`
|
|
723
|
+
|
|
724
|
+
**Recommendation.** Avoid $where; use indexed fields or parameterized queries
|
|
725
|
+
|
|
726
|
+
*Verifier:* confirmed — checked: node-express/routes/orders.js:25. The $where clause concatenates req.query.n into a JavaScript expression, allowing injection of arbitrary code.
|
|
727
|
+
|
|
728
|
+
### INJ-I-0024 — SQL Injection in perl-cgi/cgi-bin/order.cgi:13
|
|
729
|
+
|
|
730
|
+
- **Severity / confidence:** critical / high
|
|
731
|
+
- **Status:** confirmed
|
|
732
|
+
- **Category:** sql_injection (string_concatenation) — CWE-89
|
|
733
|
+
- **Endpoint:** - -
|
|
734
|
+
- **Location:** `perl-cgi/cgi-bin/order.cgi:13`
|
|
735
|
+
|
|
736
|
+
**Evidence.**
|
|
737
|
+
|
|
738
|
+
- `perl-cgi/cgi-bin/order.cgi:13` — Unsanitized input concatenated into query
|
|
739
|
+
`my $sth = $dbh->prepare("SELECT * FROM orders WHERE id = $id");`
|
|
740
|
+
- `perl-cgi/cgi-bin/order.cgi:19` — Unsanitized input concatenated into query
|
|
741
|
+
`$dbh->do("DELETE FROM carts WHERE cart_id = " . $q->param('cart'))`
|
|
742
|
+
|
|
743
|
+
**Recommendation.** Use placeholders or parameterized queries
|
|
744
|
+
|
|
745
|
+
*Verifier:* confirmed — checked: perl-cgi/cgi-bin/order.cgi:13. The SQL statement is built by interpolating the unsanitized $id variable directly into the query string.
|
|
746
|
+
|
|
747
|
+
### INJ-I-0025 — SQL Injection in perl-cgi/cgi-bin/order.cgi:19
|
|
748
|
+
|
|
749
|
+
- **Severity / confidence:** critical / high
|
|
750
|
+
- **Status:** confirmed
|
|
751
|
+
- **Category:** sql_injection (string_concatenation) — CWE-89
|
|
752
|
+
- **Endpoint:** - -
|
|
753
|
+
- **Location:** `perl-cgi/cgi-bin/order.cgi:19`
|
|
754
|
+
|
|
755
|
+
**Evidence.**
|
|
756
|
+
|
|
757
|
+
- `perl-cgi/cgi-bin/order.cgi:19` — Unsanitized input concatenated into query
|
|
758
|
+
`$dbh->do("DELETE FROM carts WHERE cart_id = " . $q->param('cart'))`
|
|
759
|
+
|
|
760
|
+
**Recommendation.** Use placeholders or parameterized queries
|
|
761
|
+
|
|
762
|
+
*Verifier:* confirmed — checked: perl-cgi/cgi-bin/order.cgi:19. The DELETE statement concatenates the unsanitized cart ID from the query string directly into the SQL command.
|
|
763
|
+
|
|
764
|
+
### INJ-I-0026 — SQL Injection in php-codeigniter/application/controllers/Invoice.php:10
|
|
765
|
+
|
|
766
|
+
- **Severity / confidence:** critical / medium
|
|
767
|
+
- **Status:** likely
|
|
768
|
+
- **Category:** sql_injection (string_concatenation) — CWE-89
|
|
769
|
+
- **Endpoint:** - -
|
|
770
|
+
- **Location:** `php-codeigniter/application/controllers/Invoice.php:10`
|
|
771
|
+
|
|
772
|
+
**Evidence.**
|
|
773
|
+
|
|
774
|
+
- `php-codeigniter/application/controllers/Invoice.php:10` — Unsanitized input concatenated into query
|
|
775
|
+
`$q = $this->db->query("SELECT * FROM invoices WHERE id = $id");`
|
|
776
|
+
|
|
777
|
+
**Recommendation.** Use parameterized queries
|
|
778
|
+
|
|
779
|
+
*Verifier:* likely — checked: php-codeigniter/application/controllers/Invoice.php:9-11. The query concatenates the id directly. No cast, allow‑list, or ownership check is present in the snippet.
|
|
780
|
+
|
|
781
|
+
### INJ-I-0027 — SQL Injection in php-plain/admin.php:12
|
|
782
|
+
|
|
783
|
+
- **Severity / confidence:** critical / medium
|
|
784
|
+
- **Status:** likely
|
|
785
|
+
- **Category:** sql_injection (string_concatenation) — CWE-89
|
|
786
|
+
- **Endpoint:** - -
|
|
787
|
+
- **Location:** `php-plain/admin.php:12`
|
|
788
|
+
|
|
789
|
+
**Evidence.**
|
|
790
|
+
|
|
791
|
+
- `php-plain/admin.php:12` — Unsanitized input concatenated into query
|
|
792
|
+
`mysql_query("DELETE FROM users WHERE id = $id");`
|
|
793
|
+
|
|
794
|
+
**Recommendation.** Use prepared statements or cast to integer
|
|
795
|
+
|
|
796
|
+
*Verifier:* likely — checked: php-plain/admin.php, php-plain/inc/auth.php, php-plain/inc/db.php. The code concatenates an unsanitized POST parameter into a DELETE statement. No ownership or role check, integer cast, or parameter binding is visible in the provided context.
|
|
797
|
+
|
|
798
|
+
### INJ-I-0029 — NoSQL Injection in php-plain/mongo_find.php:6
|
|
799
|
+
|
|
800
|
+
- **Severity / confidence:** critical / medium
|
|
801
|
+
- **Status:** likely
|
|
802
|
+
- **Category:** nosql_injection (operator_injection) — CWE-89
|
|
803
|
+
- **Endpoint:** - -
|
|
804
|
+
- **Location:** `php-plain/mongo_find.php:6`
|
|
805
|
+
|
|
806
|
+
**Evidence.**
|
|
807
|
+
|
|
808
|
+
- `php-plain/mongo_find.php:6` — Unsanitized input used in $where JavaScript expression
|
|
809
|
+
`$docs = $coll->find(array('$where' => "this.name == '" . $_GET['n'] . "'"));`
|
|
810
|
+
|
|
811
|
+
**Recommendation.** Avoid $where; use indexed fields or parameterized queries
|
|
812
|
+
|
|
813
|
+
*Verifier:* likely — checked: php-plain/mongo_find.php, php-plain/inc/auth.php. The $where clause is built from an unsanitized GET parameter. No sanitization, allow‑list, or ownership check is present in the context.
|
|
814
|
+
|
|
815
|
+
### INJ-I-0031 — SQL Injection in php-plain/order_detail.php:6
|
|
816
|
+
|
|
817
|
+
- **Severity / confidence:** critical / medium
|
|
818
|
+
- **Status:** likely
|
|
819
|
+
- **Category:** sql_injection (string_concatenation) — CWE-89
|
|
820
|
+
- **Endpoint:** - -
|
|
821
|
+
- **Location:** `php-plain/order_detail.php:6`
|
|
822
|
+
|
|
823
|
+
**Evidence.**
|
|
824
|
+
|
|
825
|
+
- `php-plain/order_detail.php:5` — source: GET parameter
|
|
826
|
+
`$id = $_GET['id'];`
|
|
827
|
+
- `php-plain/order_detail.php:6` — Unsanitized input concatenated into query
|
|
828
|
+
`$res = mysql_query("SELECT * FROM orders WHERE id = " . $id);`
|
|
829
|
+
|
|
830
|
+
**Recommendation.** Use parameterized queries
|
|
831
|
+
|
|
832
|
+
*Verifier:* likely — checked: php-plain/order_detail.php, php-plain/inc/auth.php, php-plain/inc/db.php. The GET parameter 'id' is concatenated into a SELECT statement without casting or parameter binding. No ownership or role check is visible in the provided context.
|
|
833
|
+
|
|
834
|
+
### INJ-I-0032 — SQL Injection in php-plain/search.php:8
|
|
835
|
+
|
|
836
|
+
- **Severity / confidence:** critical / medium
|
|
837
|
+
- **Status:** likely
|
|
838
|
+
- **Category:** sql_injection (string_concatenation) — CWE-89
|
|
839
|
+
- **Endpoint:** - -
|
|
840
|
+
- **Location:** `php-plain/search.php:8`
|
|
841
|
+
|
|
842
|
+
**Evidence.**
|
|
843
|
+
|
|
844
|
+
- `php-plain/search.php:6` — source: GET parameter
|
|
845
|
+
`$sort = $_GET['sort'];`
|
|
846
|
+
- `php-plain/search.php:9` — Unsanitized input concatenated into ORDER BY clause
|
|
847
|
+
`$sql .= " ORDER BY " . $sort;`
|
|
848
|
+
|
|
849
|
+
**Recommendation.** Use parameterized queries and allow‑list ORDER BY values
|
|
850
|
+
|
|
851
|
+
*Verifier:* likely — checked: php-plain/search.php:6-9. The ORDER BY clause is built from the raw $_GET['sort'] value with no cast, allow‑list, or ownership check visible in the provided context.
|
|
852
|
+
|
|
853
|
+
### INJ-I-0033 — SQL Injection in php-plain/search.php:9
|
|
854
|
+
|
|
855
|
+
- **Severity / confidence:** critical / medium
|
|
856
|
+
- **Status:** likely
|
|
857
|
+
- **Category:** sql_injection (string_concatenation) — CWE-89
|
|
858
|
+
- **Endpoint:** - -
|
|
859
|
+
- **Location:** `php-plain/search.php:9`
|
|
860
|
+
|
|
861
|
+
**Evidence.**
|
|
862
|
+
|
|
863
|
+
- `php-plain/search.php:6` — source: GET parameter
|
|
864
|
+
`$sort = $_GET['sort'];`
|
|
865
|
+
- `php-plain/search.php:9` — Unsanitized input concatenated into ORDER BY clause
|
|
866
|
+
`$sql .= " ORDER BY " . $sort;`
|
|
867
|
+
|
|
868
|
+
**Recommendation.** Use parameterized queries and allow‑list ORDER BY values
|
|
869
|
+
|
|
870
|
+
*Verifier:* likely — checked: php-plain/search.php:6-9. Same as INJ-I-0032: unsanitized ORDER BY input with no visible compensating control.
|
|
871
|
+
|
|
872
|
+
### INJ-I-0034 — SQL Injection in php-plain/search.php:14
|
|
873
|
+
|
|
874
|
+
- **Severity / confidence:** critical / medium
|
|
875
|
+
- **Status:** likely
|
|
876
|
+
- **Category:** sql_injection (string_concatenation) — CWE-89
|
|
877
|
+
- **Endpoint:** - -
|
|
878
|
+
- **Location:** `php-plain/search.php:14`
|
|
879
|
+
|
|
880
|
+
**Evidence.**
|
|
881
|
+
|
|
882
|
+
- `php-plain/search.php:14` — Unsanitized input concatenated into query
|
|
883
|
+
`WHERE category = '{$_GET['cat']}'`
|
|
884
|
+
|
|
885
|
+
**Recommendation.** Use parameterized queries
|
|
886
|
+
|
|
887
|
+
*Verifier:* likely — checked: php-plain/search.php:13-15. The category filter interpolates $_GET['cat'] directly into the query; no cast, allow‑list, or ownership check is shown.
|
|
888
|
+
|
|
889
|
+
### INJ-I-0036 — SQL Injection in python-flask/app.py:29
|
|
890
|
+
|
|
891
|
+
- **Severity / confidence:** critical / medium
|
|
892
|
+
- **Status:** likely
|
|
893
|
+
- **Category:** sql_injection (string_interpolation) — CWE-89
|
|
894
|
+
- **Endpoint:** - -
|
|
895
|
+
- **Location:** `python-flask/app.py:29`
|
|
896
|
+
|
|
897
|
+
**Evidence.**
|
|
898
|
+
|
|
899
|
+
- `python-flask/app.py:29` — Unsanitized input interpolated into query
|
|
900
|
+
`cur.execute(f"SELECT * FROM products WHERE name LIKE '%{q}%'")`
|
|
901
|
+
|
|
902
|
+
**Recommendation.** Use parameterized queries
|
|
903
|
+
|
|
904
|
+
*Verifier:* likely — checked: python-flask/app.py:24-30. The search route uses an f‑string to embed the user supplied 'q' directly into the SQL; no parameter binding or ownership check is visible.
|
|
905
|
+
|
|
906
|
+
### INJ-I-0037 — SQL Injection in sql-procs/sp_search_orders.sql:5
|
|
907
|
+
|
|
908
|
+
- **Severity / confidence:** critical / medium
|
|
909
|
+
- **Status:** likely
|
|
910
|
+
- **Category:** sql_injection (stored_procedure_dynamic_sql) — CWE-89
|
|
911
|
+
- **Endpoint:** - -
|
|
912
|
+
- **Location:** `sql-procs/sp_search_orders.sql:5`
|
|
913
|
+
|
|
914
|
+
**Evidence.**
|
|
915
|
+
|
|
916
|
+
- `sql-procs/sp_search_orders.sql:5` — Dynamic SQL built from user‑supplied parameters without validation
|
|
917
|
+
`SET @sql = 'SELECT * FROM Orders WHERE Customer = ''' + @Customer + ''' ORDER BY ' + @Sort`
|
|
918
|
+
|
|
919
|
+
**Recommendation.** Avoid dynamic SQL; use parameterized queries or validate @Sort against an allow‑list
|
|
920
|
+
|
|
921
|
+
*Verifier:* likely — checked: sql-procs/sp_search_orders.sql:4-6. Dynamic SQL is built from user‑supplied parameters without any visible validation or allow‑list. No ownership or role check is shown.
|
|
922
|
+
|
|
923
|
+
### MASS-M-0006-1 — Profile update binds entire request body to User model
|
|
924
|
+
|
|
925
|
+
- **Severity / confidence:** critical / medium
|
|
926
|
+
- **Status:** likely
|
|
927
|
+
- **Category:** mass_assignment (whole_object_binding) — CWE-915
|
|
928
|
+
- **Endpoint:** - -
|
|
929
|
+
- **Location:** `routes/profile.js:7`
|
|
930
|
+
|
|
931
|
+
**Impact.** Any authenticated user can set privileged fields such as role or admin flag via the profile update endpoint.
|
|
932
|
+
|
|
933
|
+
**Evidence.**
|
|
934
|
+
|
|
935
|
+
- `routes/profile.js:7` — ensureLoggedIn only checks authentication
|
|
936
|
+
- `routes/profile.js:8` — User.findByIdAndUpdate(req.user._id, req.body, ...) binds whole body
|
|
937
|
+
|
|
938
|
+
**Recommendation.** Limit bound fields to a whitelist and set privileged fields server‑side.
|
|
939
|
+
|
|
940
|
+
*Verifier:* likely — checked: routes/profile.js not found. The referenced file is missing from the repository; no ownership or role checks are visible in the provided context.
|
|
941
|
+
|
|
942
|
+
### MASS-M-0008-1 — User registration binds entire request body to User model
|
|
943
|
+
|
|
944
|
+
- **Severity / confidence:** critical / medium
|
|
945
|
+
- **Status:** likely
|
|
946
|
+
- **Category:** mass_assignment (whole_object_binding) — CWE-915
|
|
947
|
+
- **Endpoint:** - -
|
|
948
|
+
- **Location:** `app/Http/Controllers/AccountController.php:11`
|
|
949
|
+
|
|
950
|
+
**Impact.** Any user can set privileged fields such as role or admin flag during registration.
|
|
951
|
+
|
|
952
|
+
**Evidence.**
|
|
953
|
+
|
|
954
|
+
- `app/Http/Controllers/AccountController.php:13` — User::create($request->all()) binds whole body
|
|
955
|
+
|
|
956
|
+
**Recommendation.** Use $fillable or guarded properties to restrict writable fields.
|
|
957
|
+
|
|
958
|
+
*Verifier:* likely — checked: app/Http/Controllers/AccountController.php not found. The controller file is missing; no indication of $fillable or guarded properties in the visible context.
|
|
959
|
+
|
|
960
|
+
### MASS-M-0009-1 — Team creation allows setting owner_id via request body
|
|
961
|
+
|
|
962
|
+
- **Severity / confidence:** critical / medium
|
|
963
|
+
- **Status:** likely
|
|
964
|
+
- **Category:** mass_assignment (privileged_field_writable) — CWE-915, CWE-269
|
|
965
|
+
- **Endpoint:** - -
|
|
966
|
+
- **Location:** `app/Http/Controllers/AccountController.php:21`
|
|
967
|
+
|
|
968
|
+
**Impact.** Any user can set the owner_id of a team, effectively assigning ownership to themselves or others.
|
|
969
|
+
|
|
970
|
+
**Evidence.**
|
|
971
|
+
|
|
972
|
+
- `app/Http/Controllers/AccountController.php:23` — Team::create($request->all()) binds whole body, including owner_id
|
|
973
|
+
|
|
974
|
+
**Recommendation.** Do not allow owner_id to be set from the request; set it server‑side to the authenticated user.
|
|
975
|
+
|
|
976
|
+
*Verifier:* likely — checked: app/Http/Controllers/AccountController.php not found. The file containing the team creation logic is not available; ownership enforcement cannot be confirmed.
|
|
977
|
+
|
|
978
|
+
### MASS-M-0011-1 — Unrestricted binding of all POST fields to User in PHP plain
|
|
979
|
+
|
|
980
|
+
- **Severity / confidence:** critical / high
|
|
981
|
+
- **Status:** confirmed
|
|
982
|
+
- **Category:** mass_assignment (whole_object_binding) — CWE-915
|
|
983
|
+
- **Endpoint:** - -
|
|
984
|
+
- **Location:** `php-plain/profile.php:1`
|
|
985
|
+
|
|
986
|
+
**Impact.** role field can be set by the caller.
|
|
987
|
+
|
|
988
|
+
**Evidence.**
|
|
989
|
+
|
|
990
|
+
- `php-plain/profile.php:6` — foreach ($_POST as $field => $value) { $user->$field = $value; } (binds all fields)
|
|
991
|
+
- `php-plain/profile.php:10` — $user->role = $_POST['role']; (privileged field)
|
|
992
|
+
- `php-plain/profile.php:11` — save_user($user); (writes role to DB)
|
|
993
|
+
|
|
994
|
+
**Recommendation.** Restrict binding to allowed fields or set privileged fields server‑side.
|
|
995
|
+
|
|
996
|
+
*Verifier:* confirmed — checked: php-plain/profile.php, php-plain/inc/auth.php. The entire POST payload is assigned to the user object, allowing any field—including privileged ones—to be modified. No whitelist or server‑side restriction is visible.
|
|
997
|
+
|
|
998
|
+
### MASS-M-0012-1 — Privilege escalation via role field in PHP plain
|
|
999
|
+
|
|
1000
|
+
- **Severity / confidence:** critical / high
|
|
1001
|
+
- **Status:** confirmed
|
|
1002
|
+
- **Category:** mass_assignment (privileged_field_writable) — CWE-915, CWE-269
|
|
1003
|
+
- **Endpoint:** - -
|
|
1004
|
+
- **Location:** `php-plain/profile.php:1`
|
|
1005
|
+
|
|
1006
|
+
**Impact.** role field can be set by the caller.
|
|
1007
|
+
|
|
1008
|
+
**Evidence.**
|
|
1009
|
+
|
|
1010
|
+
- `php-plain/profile.php:10` — $user->role = $_POST['role']; (privileged field)
|
|
1011
|
+
- `php-plain/profile.php:11` — save_user($user); (writes role to DB)
|
|
1012
|
+
|
|
1013
|
+
**Recommendation.** Restrict binding to allowed fields or set privileged fields server‑side.
|
|
1014
|
+
|
|
1015
|
+
*Verifier:* confirmed — checked: php-plain/profile.php, php-plain/inc/auth.php. The 'role' field is explicitly set from POST data and persisted without any server‑side validation or restriction. No compensating control is present in the code context.
|
|
1016
|
+
|
|
1017
|
+
### MASS-M-0013-1 — User insertion uses extract($_POST) to bind all POST fields
|
|
1018
|
+
|
|
1019
|
+
- **Severity / confidence:** critical / medium
|
|
1020
|
+
- **Status:** likely
|
|
1021
|
+
- **Category:** mass_assignment (whole_object_binding) — CWE-915
|
|
1022
|
+
- **Endpoint:** - -
|
|
1023
|
+
- **Location:** `register.php:4`
|
|
1024
|
+
|
|
1025
|
+
**Impact.** Any POST field can be inserted into the users table, including privileged columns if they exist.
|
|
1026
|
+
|
|
1027
|
+
**Evidence.**
|
|
1028
|
+
|
|
1029
|
+
- `register.php:4` — extract($_POST) pulls all POST fields into variables
|
|
1030
|
+
- `register.php:5` — INSERT uses $email and $name from extracted variables
|
|
1031
|
+
|
|
1032
|
+
**Recommendation.** Avoid extract(); explicitly bind only allowed fields.
|
|
1033
|
+
|
|
1034
|
+
*Verifier:* likely — checked: register.php not found. The registration script is absent from the repository; the use of extract($_POST) cannot be verified.
|
|
1035
|
+
|
|
1036
|
+
### MASS-M-0014-1 — User creation binds entire request JSON to User model
|
|
1037
|
+
|
|
1038
|
+
- **Severity / confidence:** critical / medium
|
|
1039
|
+
- **Status:** likely
|
|
1040
|
+
- **Category:** mass_assignment (whole_object_binding) — CWE-915
|
|
1041
|
+
- **Endpoint:** - -
|
|
1042
|
+
- **Location:** `app.py:8`
|
|
1043
|
+
|
|
1044
|
+
**Impact.** Any user can set privileged fields such as role or admin flag during account creation.
|
|
1045
|
+
|
|
1046
|
+
**Evidence.**
|
|
1047
|
+
|
|
1048
|
+
- `app.py:10` — User(**request.json) binds all JSON fields
|
|
1049
|
+
|
|
1050
|
+
**Recommendation.** Use a DTO or whitelist to restrict writable fields.
|
|
1051
|
+
|
|
1052
|
+
*Verifier:* likely — checked: app.py not present in provided code_context. The user creation code that binds the entire request JSON is not shown; therefore it is impossible to confirm the presence or absence of a whitelist or other protective measure.
|
|
1053
|
+
|
|
1054
|
+
### MASS-M-0015-1 — PATCH endpoint sets arbitrary attributes from request JSON
|
|
1055
|
+
|
|
1056
|
+
- **Severity / confidence:** critical / medium
|
|
1057
|
+
- **Status:** likely
|
|
1058
|
+
- **Category:** mass_assignment (whole_object_binding) — CWE-915
|
|
1059
|
+
- **Endpoint:** - -
|
|
1060
|
+
- **Location:** `app.py:24`
|
|
1061
|
+
|
|
1062
|
+
**Impact.** Any user can modify any attribute of the user record, including privileged fields.
|
|
1063
|
+
|
|
1064
|
+
**Evidence.**
|
|
1065
|
+
|
|
1066
|
+
- `app.py:27` — for key, value in request.json.items(): setattr(user, key, value) binds all fields
|
|
1067
|
+
|
|
1068
|
+
**Recommendation.** Whitelist allowed fields or use a DTO.
|
|
1069
|
+
|
|
1070
|
+
*Verifier:* likely — checked: app.py not present in provided code_context. The relevant code that performs the PATCH binding is not included in the supplied context, so no compensating control can be verified.
|
|
1071
|
+
|
|
1072
|
+
### BOLA-R-0001-1 — BOLA in POST /user/edit.do: missing owner verification
|
|
1073
|
+
|
|
1074
|
+
- **Severity / confidence:** high / medium
|
|
1075
|
+
- **Status:** likely
|
|
1076
|
+
- **Category:** bola (missing_ownership_check) — CWE-284, CWE-639
|
|
1077
|
+
- **Endpoint:** POST /user/edit.do
|
|
1078
|
+
- **Location:** `java-legacy/src/com/acme/struts/EditUserAction.java:13`
|
|
1079
|
+
|
|
1080
|
+
**Evidence.**
|
|
1081
|
+
|
|
1082
|
+
- `java-legacy/src/com/acme/struts/EditUserAction.java:13` — The user ID comes from the request and is used directly in the UPDATE without checking that the current user owns the record.
|
|
1083
|
+
`PreparedStatement ps = conn.prepareStatement("UPDATE users SET email = '" + email + "' WHERE id = " + userId);`
|
|
1084
|
+
|
|
1085
|
+
**Recommendation.** Bind the UPDATE to the current session user.
|
|
1086
|
+
|
|
1087
|
+
*Verifier:* likely — checked: EditUserAction.java:10-13. The code shows the userId coming directly from the request and used in an UPDATE statement without any ownership check, cast, or parameter binding. No ownership helper or allow‑list is visible in the provided context.
|
|
1088
|
+
|
|
1089
|
+
### BOLA-R-0002-1 — BOLA in POST /classic-asp/shop/member.asp?mode=edit: missing owner verification
|
|
1090
|
+
|
|
1091
|
+
- **Severity / confidence:** high / medium
|
|
1092
|
+
- **Status:** likely
|
|
1093
|
+
- **Category:** bola (missing_ownership_check) — CWE-284, CWE-639
|
|
1094
|
+
- **Endpoint:** POST /classic-asp/shop/member.asp?mode=edit
|
|
1095
|
+
- **Location:** `classic-asp/shop/member.asp:6`
|
|
1096
|
+
|
|
1097
|
+
**Evidence.**
|
|
1098
|
+
|
|
1099
|
+
- `classic-asp/shop/member.asp:6` — The member_id comes from the request and is used directly in the UPDATE without verifying ownership.
|
|
1100
|
+
`sql = "UPDATE members SET name = '" & Replace(Request.Form("name"), "'", "''") & "'"`
|
|
1101
|
+
- `classic-asp/shop/member.asp:7` — No ownership check is performed.
|
|
1102
|
+
`sql = sql & " WHERE member_id = " & Request.Form("member_id")`
|
|
1103
|
+
|
|
1104
|
+
**Recommendation.** Add an ownership check to the UPDATE statement.
|
|
1105
|
+
|
|
1106
|
+
*Verifier:* likely — checked: classic-asp/shop/member.asp:6-7, classic-asp/shop/inc/auth.asp, classic-asp/shop/inc/conn.asp. The UPDATE statement uses member_id from the request without any ownership verification. The included auth file only checks for a non‑empty session, not for ownership.
|
|
1107
|
+
|
|
1108
|
+
### BOLA-R-0003-1 — BOLA in DELETE /classic-asp/shop/member.asp?mode=delete: missing owner verification
|
|
1109
|
+
|
|
1110
|
+
- **Severity / confidence:** high / medium
|
|
1111
|
+
- **Status:** likely
|
|
1112
|
+
- **Category:** bola (missing_ownership_check) — CWE-284, CWE-639
|
|
1113
|
+
- **Endpoint:** DELETE /classic-asp/shop/member.asp?mode=delete
|
|
1114
|
+
- **Location:** `classic-asp/shop/member.asp:10`
|
|
1115
|
+
|
|
1116
|
+
**Evidence.**
|
|
1117
|
+
|
|
1118
|
+
- `classic-asp/shop/member.asp:10` — The member_id comes from the request and is used directly in the DELETE without verifying ownership.
|
|
1119
|
+
`conn.Execute "DELETE FROM members WHERE member_id = " & Request.QueryString("member_id")`
|
|
1120
|
+
|
|
1121
|
+
**Recommendation.** Add an ownership check to the DELETE statement.
|
|
1122
|
+
|
|
1123
|
+
*Verifier:* likely — checked: classic-asp/shop/member.asp:10, classic-asp/shop/inc/auth.asp, classic-asp/shop/inc/conn.asp. The DELETE statement uses member_id from the request directly. No ownership check or cast is present in the visible code.
|
|
1124
|
+
|
|
1125
|
+
### BOLA-R-0004-1 — BOLA in GET /classic-asp/shop/order.asp: missing owner verification
|
|
1126
|
+
|
|
1127
|
+
- **Severity / confidence:** high / medium
|
|
1128
|
+
- **Status:** likely
|
|
1129
|
+
- **Category:** bola (missing_ownership_check) — CWE-284, CWE-639
|
|
1130
|
+
- **Endpoint:** GET /classic-asp/shop/order.asp
|
|
1131
|
+
- **Location:** `classic-asp/shop/order.asp:5`
|
|
1132
|
+
|
|
1133
|
+
**Evidence.**
|
|
1134
|
+
|
|
1135
|
+
- `classic-asp/shop/order.asp:5` — The order id comes from the request.
|
|
1136
|
+
`id = Request("id")`
|
|
1137
|
+
- `classic-asp/shop/order.asp:6` — No ownership check is performed; any user can read any order.
|
|
1138
|
+
`Set rs = conn.Execute("SELECT * FROM orders WHERE id = " & id)`
|
|
1139
|
+
|
|
1140
|
+
**Recommendation.** Bind the SELECT to the current session user.
|
|
1141
|
+
|
|
1142
|
+
*Verifier:* likely — checked: classic-asp/shop/order.asp:5-6, classic-asp/shop/inc/auth.asp, classic-asp/shop/inc/conn.asp. The first SELECT query retrieves an order by id supplied in the request without verifying that the current user owns the order. The later query that uses Session("UserID") is unrelated to the initial unprotected query.
|
|
1143
|
+
|
|
1144
|
+
### BOLA-R-0005-1 — BOLA in GET /coldfusion/app/OrderService.cfc?method=getOrder: missing owner verification
|
|
1145
|
+
|
|
1146
|
+
- **Severity / confidence:** high / medium
|
|
1147
|
+
- **Status:** likely
|
|
1148
|
+
- **Category:** bola (missing_ownership_check) — CWE-284, CWE-639
|
|
1149
|
+
- **Endpoint:** GET /coldfusion/app/OrderService.cfc?method=getOrder
|
|
1150
|
+
- **Location:** `coldfusion/app/OrderService.cfc:4`
|
|
1151
|
+
|
|
1152
|
+
**Evidence.**
|
|
1153
|
+
|
|
1154
|
+
- `coldfusion/app/OrderService.cfc:4` — The orderId comes from the request and is used directly without checking ownership.
|
|
1155
|
+
`<cfquery name="q" datasource="shop"> SELECT * FROM orders WHERE id = #arguments.orderId#`
|
|
1156
|
+
|
|
1157
|
+
**Recommendation.** Add an ownership check to the SELECT statement.
|
|
1158
|
+
|
|
1159
|
+
*Verifier:* likely — checked: coldfusion/app/OrderService.cfc:4-5. The query interpolates arguments.orderId directly into the SQL without any ownership check, cast, or allow‑list. No ownership helper is visible in the provided context.
|
|
1160
|
+
|
|
1161
|
+
### BOLA-R-0006-1 — BOLA in GET /coldfusion/app/order.cfm: missing owner verification
|
|
1162
|
+
|
|
1163
|
+
- **Severity / confidence:** high / medium
|
|
1164
|
+
- **Status:** likely
|
|
1165
|
+
- **Category:** bola (missing_ownership_check) — CWE-284, CWE-639
|
|
1166
|
+
- **Endpoint:** GET /coldfusion/app/order.cfm
|
|
1167
|
+
- **Location:** `coldfusion/app/order.cfm:3`
|
|
1168
|
+
|
|
1169
|
+
**Evidence.**
|
|
1170
|
+
|
|
1171
|
+
- `coldfusion/app/order.cfm:3` — The id comes from the request and is used directly without checking ownership.
|
|
1172
|
+
`<cfquery name="qOrder" datasource="shop"> SELECT * FROM orders WHERE id = #url.id#`
|
|
1173
|
+
|
|
1174
|
+
**Recommendation.** Add an ownership check to the SELECT statement.
|
|
1175
|
+
|
|
1176
|
+
*Verifier:* likely — checked: coldfusion/app/order.cfm:1-10. The query that retrieves the order uses the request id directly and no ownership check or cast is visible in the provided code context.
|
|
1177
|
+
|
|
1178
|
+
### BOLA-R-0007-1 — BOLA in POST /Admin/DeleteUser: missing owner verification
|
|
1179
|
+
|
|
1180
|
+
- **Severity / confidence:** high / medium
|
|
1181
|
+
- **Status:** likely
|
|
1182
|
+
- **Category:** bola (missing_ownership_check) — CWE-284, CWE-639
|
|
1183
|
+
- **Endpoint:** POST /Admin/DeleteUser
|
|
1184
|
+
- **Location:** `dotnet-legacy/Web/Controllers/AdminController.cs:12`
|
|
1185
|
+
|
|
1186
|
+
**Evidence.**
|
|
1187
|
+
|
|
1188
|
+
- `dotnet-legacy/Web/Controllers/AdminController.cs:12` — The user id comes from the request and is used directly without verifying that the current user owns the account.
|
|
1189
|
+
`public ActionResult DeleteUser(int id) { var u = db.Users.Find(id); db.Users.Remove(u); db.SaveChanges(); }`
|
|
1190
|
+
|
|
1191
|
+
**Recommendation.** Require admin role or check that the current user is the owner before deleting.
|
|
1192
|
+
|
|
1193
|
+
*Verifier:* likely — checked: dotnet-legacy/Web/Controllers/AdminController.cs:11-18. The DeleteUser action is protected only by a generic [Authorize] attribute; no role or ownership check is present in the visible code.
|
|
1194
|
+
|
|
1195
|
+
### BOLA-R-0008-1 — BOLA in POST /Admin/Export: missing role verification
|
|
1196
|
+
|
|
1197
|
+
- **Severity / confidence:** high / medium
|
|
1198
|
+
- **Status:** likely
|
|
1199
|
+
- **Category:** bola (missing_ownership_check) — CWE-284, CWE-639
|
|
1200
|
+
- **Endpoint:** POST /Admin/Export
|
|
1201
|
+
- **Location:** `dotnet-legacy/Web/Controllers/AdminController.cs:32`
|
|
1202
|
+
|
|
1203
|
+
**Evidence.**
|
|
1204
|
+
|
|
1205
|
+
- `dotnet-legacy/Web/Controllers/AdminController.cs:32` — No role check; any authenticated user can set isAdmin=true and retrieve all users.
|
|
1206
|
+
`if (Request.QueryString["isAdmin"] == "true") { return Json(db.Users.ToList(), JsonRequestBehavior.AllowGet); }`
|
|
1207
|
+
|
|
1208
|
+
**Recommendation.** Enforce admin role before returning the user list.
|
|
1209
|
+
|
|
1210
|
+
*Verifier:* likely — checked: dotnet-legacy/Web/Controllers/AdminController.cs:30-36. The Export action checks only a query string flag; no role or ownership verification is shown.
|
|
1211
|
+
|
|
1212
|
+
### BOLA-R-0009-1 — BOLA in POST /Admin/Export: missing role verification
|
|
1213
|
+
|
|
1214
|
+
- **Severity / confidence:** high / medium
|
|
1215
|
+
- **Status:** likely
|
|
1216
|
+
- **Category:** bola (missing_ownership_check) — CWE-284, CWE-639
|
|
1217
|
+
- **Endpoint:** POST /Admin/Export
|
|
1218
|
+
- **Location:** `dotnet-legacy/Web/Controllers/AdminController.cs:32`
|
|
1219
|
+
|
|
1220
|
+
**Evidence.**
|
|
1221
|
+
|
|
1222
|
+
- `dotnet-legacy/Web/Controllers/AdminController.cs:32` — No role check; any authenticated user can set isAdmin=true and retrieve all users.
|
|
1223
|
+
`if (Request.QueryString["isAdmin"] == "true") { return Json(db.Users.ToList(), JsonRequestBehavior.AllowGet); }`
|
|
1224
|
+
|
|
1225
|
+
**Recommendation.** Enforce admin role before returning the user list.
|
|
1226
|
+
|
|
1227
|
+
*Verifier:* likely — checked: dotnet-legacy/Web/Controllers/AdminController.cs:30-36. Same as BOLA-R-0008-1; no role or ownership check is visible.
|
|
1228
|
+
|
|
1229
|
+
### BOLA-R-0010 — BOLA in POST /Customer/Edit: missing owner verification
|
|
1230
|
+
|
|
1231
|
+
- **Severity / confidence:** high / high
|
|
1232
|
+
- **Status:** confirmed
|
|
1233
|
+
- **Category:** bola (missing_ownership_check) — CWE-284, CWE-639
|
|
1234
|
+
- **Endpoint:** POST /Customer/Edit
|
|
1235
|
+
- **Location:** `dotnet-legacy/Web/Controllers/CustomerController.cs:12`
|
|
1236
|
+
|
|
1237
|
+
**Evidence.**
|
|
1238
|
+
|
|
1239
|
+
- `dotnet-legacy/Web/Controllers/CustomerController.cs:12` — The Customer object is bound directly from the request and saved without checking that customer.Id belongs to the authenticated user.
|
|
1240
|
+
`public ActionResult Edit(Customer customer)
|
|
1241
|
+
{
|
|
1242
|
+
db.Entry(customer).State = System.Data.Entity.EntityState.Modified;
|
|
1243
|
+
db.SaveChanges();
|
|
1244
|
+
return RedirectToAction("Index");
|
|
1245
|
+
}`
|
|
1246
|
+
|
|
1247
|
+
**Recommendation.** Ensure the customer being edited belongs to the current user or that the user has permission to edit it.
|
|
1248
|
+
|
|
1249
|
+
*Verifier:* confirmed — checked: dotnet-legacy/Web/Controllers/CustomerController.cs lines 6-16. The action is protected by [Authorize] (ensuring authentication) but performs a direct update of the bound Customer entity without verifying that the customer belongs to the current user.
|
|
1250
|
+
|
|
1251
|
+
### BOLA-R-0011 — BOLA in POST /Customer/EditName: missing owner verification
|
|
1252
|
+
|
|
1253
|
+
- **Severity / confidence:** high / high
|
|
1254
|
+
- **Status:** confirmed
|
|
1255
|
+
- **Category:** bola (missing_ownership_check) — CWE-284, CWE-639
|
|
1256
|
+
- **Endpoint:** POST /Customer/EditName
|
|
1257
|
+
- **Location:** `dotnet-legacy/Web/Controllers/CustomerController.cs:20`
|
|
1258
|
+
|
|
1259
|
+
**Evidence.**
|
|
1260
|
+
|
|
1261
|
+
- `dotnet-legacy/Web/Controllers/CustomerController.cs:20` — The Customer object is bound from the request and saved without verifying that the Id belongs to the authenticated user.
|
|
1262
|
+
`public ActionResult EditName([Bind(Include = "Id,Name")] Customer customer)
|
|
1263
|
+
{
|
|
1264
|
+
db.SaveChanges();
|
|
1265
|
+
return RedirectToAction("Index");
|
|
1266
|
+
}`
|
|
1267
|
+
|
|
1268
|
+
**Recommendation.** Validate that the customer Id matches the current user before saving.
|
|
1269
|
+
|
|
1270
|
+
*Verifier:* confirmed — checked: dotnet-legacy/Web/Controllers/CustomerController.cs lines 20-23. The EditName action accepts a bound Customer with only Id and Name, then calls db.SaveChanges() without any ownership validation.
|
|
1271
|
+
|
|
1272
|
+
### BOLA-R-0012 — BOLA in POST /Customer/Refresh: missing owner verification
|
|
1273
|
+
|
|
1274
|
+
- **Severity / confidence:** high / high
|
|
1275
|
+
- **Status:** confirmed
|
|
1276
|
+
- **Category:** bola (missing_ownership_check) — CWE-284, CWE-639
|
|
1277
|
+
- **Endpoint:** POST /Customer/Refresh
|
|
1278
|
+
- **Location:** `dotnet-legacy/Web/Controllers/CustomerController.cs:27`
|
|
1279
|
+
|
|
1280
|
+
**Evidence.**
|
|
1281
|
+
|
|
1282
|
+
- `dotnet-legacy/Web/Controllers/CustomerController.cs:27` — The id is taken from the URL and used to load a customer record without verifying that the customer belongs to the authenticated user.
|
|
1283
|
+
`public ActionResult Refresh(int id)
|
|
1284
|
+
{
|
|
1285
|
+
var customer = db.Customers.Find(id);
|
|
1286
|
+
TryUpdateModel(customer);
|
|
1287
|
+
db.SaveChanges();
|
|
1288
|
+
return RedirectToAction("Index");
|
|
1289
|
+
}`
|
|
1290
|
+
|
|
1291
|
+
**Recommendation.** Check that the customer id belongs to the current user before updating.
|
|
1292
|
+
|
|
1293
|
+
*Verifier:* confirmed — checked: dotnet-legacy/Web/Controllers/CustomerController.cs lines 27-32. The Refresh action loads a Customer by id from the URL and updates it without checking that the customer belongs to the authenticated user.
|
|
1294
|
+
|
|
1295
|
+
### BOLA-R-0013-1 — BOLA in GET /Invoice/Details: missing owner verification
|
|
1296
|
+
|
|
1297
|
+
- **Severity / confidence:** high / medium
|
|
1298
|
+
- **Status:** likely
|
|
1299
|
+
- **Category:** bola (missing_ownership_check) — CWE-284, CWE-639
|
|
1300
|
+
- **Endpoint:** GET /Invoice/Details
|
|
1301
|
+
- **Location:** `dotnet-legacy/Web/Controllers/InvoiceController.cs:13`
|
|
1302
|
+
|
|
1303
|
+
**Evidence.**
|
|
1304
|
+
|
|
1305
|
+
- `dotnet-legacy/Web/Controllers/InvoiceController.cs:13` — The invoice id comes from the request and is used directly without checking ownership.
|
|
1306
|
+
`var inv = db.Invoices.Find(id); return View(inv);`
|
|
1307
|
+
|
|
1308
|
+
**Recommendation.** Add an ownership check to the invoice lookup.
|
|
1309
|
+
|
|
1310
|
+
*Verifier:* likely — checked: dotnet-legacy/Web/Controllers/InvoiceController.cs:11-15. The Details action retrieves an invoice by id without any ownership or role check in the provided code context.
|
|
1311
|
+
|
|
1312
|
+
### BOLA-R-0014-1 — BOLA in GET /Invoice/Details: missing owner verification
|
|
1313
|
+
|
|
1314
|
+
- **Severity / confidence:** high / medium
|
|
1315
|
+
- **Status:** likely
|
|
1316
|
+
- **Category:** bola (missing_ownership_check) — CWE-284, CWE-639
|
|
1317
|
+
- **Endpoint:** GET /Invoice/Details
|
|
1318
|
+
- **Location:** `dotnet-legacy/Web/Controllers/InvoiceController.cs:13`
|
|
1319
|
+
|
|
1320
|
+
**Evidence.**
|
|
1321
|
+
|
|
1322
|
+
- `dotnet-legacy/Web/Controllers/InvoiceController.cs:13` — The invoice id comes from the request and is used directly without checking ownership.
|
|
1323
|
+
`var inv = db.Invoices.Find(id); return View(inv);`
|
|
1324
|
+
|
|
1325
|
+
**Recommendation.** Add an ownership check to the invoice lookup.
|
|
1326
|
+
|
|
1327
|
+
*Verifier:* likely — checked: dotnet-legacy/Web/Controllers/InvoiceController.cs lines 6-15. The controller method retrieves an invoice by id without any ownership check. No ownership verification is visible in the provided code context.
|
|
1328
|
+
|
|
1329
|
+
### BOLA-R-0015-1 — BOLA in POST /Invoice/Search: missing owner verification
|
|
1330
|
+
|
|
1331
|
+
- **Severity / confidence:** high / medium
|
|
1332
|
+
- **Status:** likely
|
|
1333
|
+
- **Category:** bola (missing_ownership_check) — CWE-284, CWE-639
|
|
1334
|
+
- **Endpoint:** POST /Invoice/Search
|
|
1335
|
+
- **Location:** `dotnet-legacy/Web/Controllers/InvoiceController.cs:28`
|
|
1336
|
+
|
|
1337
|
+
**Evidence.**
|
|
1338
|
+
|
|
1339
|
+
- `dotnet-legacy/Web/Controllers/InvoiceController.cs:28` — The customer value comes from the request and is used directly without checking ownership.
|
|
1340
|
+
`var list = db.Database.SqlQuery<Invoice>("SELECT * FROM Invoices WHERE Customer = '" + customer + "'").ToList();`
|
|
1341
|
+
|
|
1342
|
+
**Recommendation.** Add an ownership check to the search query.
|
|
1343
|
+
|
|
1344
|
+
*Verifier:* likely — checked: dotnet-legacy/Web/Controllers/InvoiceController.cs lines 25-30. The search query concatenates the customer parameter directly into SQL. No ownership or parameter binding is shown in the context.
|
|
1345
|
+
|
|
1346
|
+
### BOLA-R-0016 — BOLA in ANY /dotnet-legacy/Web/Handlers/GetFile.ashx: missing owner verification
|
|
1347
|
+
|
|
1348
|
+
- **Severity / confidence:** high / medium
|
|
1349
|
+
- **Status:** likely
|
|
1350
|
+
- **Category:** bola (no_authentication) — CWE-284, CWE-639
|
|
1351
|
+
- **Endpoint:** ANY /dotnet-legacy/Web/Handlers/GetFile.ashx
|
|
1352
|
+
- **Location:** `dotnet-legacy/Web/Handlers/GetFile.ashx:8`
|
|
1353
|
+
|
|
1354
|
+
**Evidence.**
|
|
1355
|
+
|
|
1356
|
+
- `dotnet-legacy/Web/Handlers/GetFile.ashx:8` — The file identifier comes directly from the query string and is used to transmit a file without any authentication or ownership check.
|
|
1357
|
+
`string fileId = context.Request.QueryString["file_id"];
|
|
1358
|
+
string path = DocStore.PathFor(fileId);
|
|
1359
|
+
context.Response.TransmitFile(path);`
|
|
1360
|
+
|
|
1361
|
+
**Recommendation.** Require authentication and verify that the requested file belongs to the current user before transmitting.
|
|
1362
|
+
|
|
1363
|
+
*Verifier:* likely — checked: dotnet-legacy/Web/Handlers/GetFile.ashx lines 8-10. The handler transmits a file based on a query string parameter without any visible authentication or ownership check. No global authentication include is shown in the code_context.
|
|
1364
|
+
|
|
1365
|
+
### BOLA-R-0017-1 — BOLA in POST /dotnet-legacy/Web/Orders/EditOrder.aspx: missing owner verification
|
|
1366
|
+
|
|
1367
|
+
- **Severity / confidence:** high / medium
|
|
1368
|
+
- **Status:** likely
|
|
1369
|
+
- **Category:** bola (missing_ownership_check) — CWE-284, CWE-639
|
|
1370
|
+
- **Endpoint:** POST /dotnet-legacy/Web/Orders/EditOrder.aspx
|
|
1371
|
+
- **Location:** `dotnet-legacy/Web/Orders/EditOrder.aspx.vb:7`
|
|
1372
|
+
|
|
1373
|
+
**Evidence.**
|
|
1374
|
+
|
|
1375
|
+
- `dotnet-legacy/Web/Orders/EditOrder.aspx.vb:7` — The OrderId comes from the request (hfOrderId.Value) and is used directly without checking ownership.
|
|
1376
|
+
`Dim sql As String = "UPDATE Orders SET Note = '" & txtNote.Text & "'"`
|
|
1377
|
+
- `dotnet-legacy/Web/Orders/EditOrder.aspx.vb:8` — No ownership check is performed.
|
|
1378
|
+
`sql &= " WHERE OrderId = " & hfOrderId.Value`
|
|
1379
|
+
|
|
1380
|
+
**Recommendation.** Add an ownership check to the UPDATE statement.
|
|
1381
|
+
|
|
1382
|
+
*Verifier:* likely — checked: dotnet-legacy/Web/Orders/EditOrder.aspx.vb lines 7-13. The UPDATE statement uses the OrderId from a hidden field without any ownership check. No compensating control is visible.
|
|
1383
|
+
|
|
1384
|
+
### BOLA-R-0018-1 — BOLA in GET /dotnet-legacy/Web/Orders/OrderDetail.aspx: missing owner verification
|
|
1385
|
+
|
|
1386
|
+
- **Severity / confidence:** high / medium
|
|
1387
|
+
- **Status:** likely
|
|
1388
|
+
- **Category:** bola (missing_ownership_check) — CWE-284, CWE-639
|
|
1389
|
+
- **Endpoint:** GET /dotnet-legacy/Web/Orders/OrderDetail.aspx
|
|
1390
|
+
- **Location:** `dotnet-legacy/Web/Orders/OrderDetail.aspx.cs:13`
|
|
1391
|
+
|
|
1392
|
+
**Evidence.**
|
|
1393
|
+
|
|
1394
|
+
- `dotnet-legacy/Web/Orders/OrderDetail.aspx.cs:13` — The OrderId comes from the request and is used directly without checking ownership.
|
|
1395
|
+
`var cmd = new SqlCommand("SELECT * FROM Orders WHERE OrderId = " + id, conn);`
|
|
1396
|
+
|
|
1397
|
+
**Recommendation.** Add an ownership check to the SELECT statement.
|
|
1398
|
+
|
|
1399
|
+
*Verifier:* likely — checked: dotnet-legacy/Web/Orders/OrderDetail.aspx.cs lines 10-17. The first SELECT query uses the id from the query string without ownership verification. The later safe query is not used for this data retrieval.
|
|
1400
|
+
|
|
1401
|
+
### BOLA-R-0019-1 — BOLA in GET /java-legacy/WebContent/order/detail.jsp: missing owner verification
|
|
1402
|
+
|
|
1403
|
+
- **Severity / confidence:** high / medium
|
|
1404
|
+
- **Status:** likely
|
|
1405
|
+
- **Category:** bola (missing_ownership_check) — CWE-284, CWE-639
|
|
1406
|
+
- **Endpoint:** GET /java-legacy/WebContent/order/detail.jsp
|
|
1407
|
+
- **Location:** `java-legacy/WebContent/order/detail.jsp:5`
|
|
1408
|
+
|
|
1409
|
+
**Evidence.**
|
|
1410
|
+
|
|
1411
|
+
- `java-legacy/WebContent/order/detail.jsp:5` — The order_no comes from the request and is used directly without checking ownership.
|
|
1412
|
+
`ResultSet rs = c.createStatement().executeQuery("SELECT * FROM orders WHERE order_no = '" + no + "'");`
|
|
1413
|
+
|
|
1414
|
+
**Recommendation.** Add an ownership check to the SELECT statement.
|
|
1415
|
+
|
|
1416
|
+
*Verifier:* likely — checked: java-legacy/WebContent/order/detail.jsp lines 3-5. The SQL statement concatenates the order_no parameter directly. No ownership check is present in the visible code.
|
|
1417
|
+
|
|
1418
|
+
### BOLA-R-0020 — BOLA in POST /account/save: missing owner verification
|
|
1419
|
+
|
|
1420
|
+
- **Severity / confidence:** high / high
|
|
1421
|
+
- **Status:** confirmed
|
|
1422
|
+
- **Category:** bola (missing_ownership_check) — CWE-284, CWE-639
|
|
1423
|
+
- **Endpoint:** POST /account/save
|
|
1424
|
+
- **Location:** `java-legacy/src/com/acme/web/AccountController.java:15`
|
|
1425
|
+
|
|
1426
|
+
**Evidence.**
|
|
1427
|
+
|
|
1428
|
+
- `java-legacy/src/com/acme/web/AccountController.java:15` — Account ID can be set to another user's ID; no ownership check performed.
|
|
1429
|
+
`accountDao.save(account);`
|
|
1430
|
+
|
|
1431
|
+
**Recommendation.** Bind the operation to the current session user.
|
|
1432
|
+
|
|
1433
|
+
*Verifier:* confirmed — checked: java-legacy/src/com/acme/web/AccountController.java:13-15. The POST /account/save handler directly calls accountDao.save(account) with no ownership or role check in the visible code.
|
|
1434
|
+
|
|
1435
|
+
### BOLA-R-0021 — BOLA in POST /account/rename: missing owner verification
|
|
1436
|
+
|
|
1437
|
+
- **Severity / confidence:** high / high
|
|
1438
|
+
- **Status:** confirmed
|
|
1439
|
+
- **Category:** bola (missing_ownership_check) — CWE-284, CWE-639
|
|
1440
|
+
- **Endpoint:** POST /account/rename
|
|
1441
|
+
- **Location:** `java-legacy/src/com/acme/web/AccountController.java:21`
|
|
1442
|
+
|
|
1443
|
+
**Evidence.**
|
|
1444
|
+
|
|
1445
|
+
- `java-legacy/src/com/acme/web/AccountController.java:21` — The form ID can point to another user's account; no ownership check.
|
|
1446
|
+
`accountDao.rename(form.getId(), form.getName());`
|
|
1447
|
+
|
|
1448
|
+
**Recommendation.** Verify that the account belongs to the current user before renaming.
|
|
1449
|
+
|
|
1450
|
+
*Verifier:* confirmed — checked: java-legacy/src/com/acme/web/AccountController.java:19-21. The POST /account/rename handler invokes accountDao.rename(form.getId(), form.getName()) without any ownership verification in the shown code.
|
|
1451
|
+
|
|
1452
|
+
### BOLA-R-0022 — BOLA in PUT /account/api: missing owner verification
|
|
1453
|
+
|
|
1454
|
+
- **Severity / confidence:** high / high
|
|
1455
|
+
- **Status:** confirmed
|
|
1456
|
+
- **Category:** bola (missing_ownership_check) — CWE-284, CWE-639
|
|
1457
|
+
- **Endpoint:** PUT /account/api
|
|
1458
|
+
- **Location:** `java-legacy/src/com/acme/web/AccountController.java:28`
|
|
1459
|
+
|
|
1460
|
+
**Evidence.**
|
|
1461
|
+
|
|
1462
|
+
- `java-legacy/src/com/acme/web/AccountController.java:28` — Account ID can be set to another user's ID; no ownership check.
|
|
1463
|
+
`return accountDao.save(account);`
|
|
1464
|
+
|
|
1465
|
+
**Recommendation.** Ensure the account belongs to the current user before saving.
|
|
1466
|
+
|
|
1467
|
+
*Verifier:* confirmed — checked: java-legacy/src/com/acme/web/AccountController.java:25-28. The PUT /account/api handler returns accountDao.save(account) with no ownership or role check in the visible code.
|
|
1468
|
+
|
|
1469
|
+
### BOLA-R-0023 — BOLA in POST /admin/users/{id}/delete: missing owner verification
|
|
1470
|
+
|
|
1471
|
+
- **Severity / confidence:** high / high
|
|
1472
|
+
- **Status:** confirmed
|
|
1473
|
+
- **Category:** bola (missing_ownership_check) — CWE-284, CWE-639
|
|
1474
|
+
- **Endpoint:** POST /admin/users/{id}/delete
|
|
1475
|
+
- **Location:** `java-legacy/src/com/acme/web/AdminUserController.java:15`
|
|
1476
|
+
|
|
1477
|
+
**Evidence.**
|
|
1478
|
+
|
|
1479
|
+
- `java-legacy/src/com/acme/web/AdminUserController.java:15` — Any authenticated user can delete any user; no ownership or admin check.
|
|
1480
|
+
`userDao.deleteById(id);`
|
|
1481
|
+
|
|
1482
|
+
**Recommendation.** Restrict delete to admins or verify ownership.
|
|
1483
|
+
|
|
1484
|
+
*Verifier:* confirmed — checked: java-legacy/src/com/acme/web/AdminUserController.java:13-15. The POST /admin/users/{id}/delete handler calls userDao.deleteById(id) without any role or ownership check in the shown code.
|
|
1485
|
+
|
|
1486
|
+
### BOLA-R-0025 — BOLA in GET /invoices/{id}: missing owner verification
|
|
1487
|
+
|
|
1488
|
+
- **Severity / confidence:** high / high
|
|
1489
|
+
- **Status:** confirmed
|
|
1490
|
+
- **Category:** bola (missing_ownership_check) — CWE-284, CWE-639
|
|
1491
|
+
- **Endpoint:** GET /invoices/{id}
|
|
1492
|
+
- **Location:** `java-legacy/src/com/acme/web/InvoiceController.java:17`
|
|
1493
|
+
|
|
1494
|
+
**Evidence.**
|
|
1495
|
+
|
|
1496
|
+
- `java-legacy/src/com/acme/web/InvoiceController.java:17` — Invoice ID can be any value; no ownership check.
|
|
1497
|
+
`model.addAttribute("invoice", invoiceDao.findById(id));`
|
|
1498
|
+
|
|
1499
|
+
**Recommendation.** Bind the invoice lookup to the current user.
|
|
1500
|
+
|
|
1501
|
+
*Verifier:* confirmed — checked: java-legacy/src/com/acme/web/InvoiceController.java:15-17. The GET /invoices/{id} handler uses invoiceDao.findById(id) directly, with no ownership verification in the visible code.
|
|
1502
|
+
|
|
1503
|
+
### BOLA-R-0027 — BOLA in GET /invoices/search: missing owner verification
|
|
1504
|
+
|
|
1505
|
+
- **Severity / confidence:** high / medium
|
|
1506
|
+
- **Status:** likely
|
|
1507
|
+
- **Category:** bola (missing_ownership_check) — CWE-284, CWE-639
|
|
1508
|
+
- **Endpoint:** GET /invoices/search
|
|
1509
|
+
- **Location:** `java-legacy/src/com/acme/web/InvoiceController.java:29`
|
|
1510
|
+
|
|
1511
|
+
**Evidence.**
|
|
1512
|
+
|
|
1513
|
+
- `java-legacy/src/com/acme/web/InvoiceController.java:29` — Search results are not filtered by the current user.
|
|
1514
|
+
`model.addAttribute("list", session.createQuery("from Invoice i where i.customer = '" + customer + "'").list());`
|
|
1515
|
+
|
|
1516
|
+
**Recommendation.** Filter invoices by the current user.
|
|
1517
|
+
|
|
1518
|
+
*Verifier:* likely — checked: InvoiceController.java:27-30. The search query concatenates the customer parameter directly and does not reference the current user or any ownership check. No global filter or allow‑list is shown in the provided context.
|
|
1519
|
+
|
|
1520
|
+
### BOLA-R-0028 — BOLA in GET /order/view: missing owner verification
|
|
1521
|
+
|
|
1522
|
+
- **Severity / confidence:** high / medium
|
|
1523
|
+
- **Status:** likely
|
|
1524
|
+
- **Category:** bola (missing_ownership_check) — CWE-284, CWE-639
|
|
1525
|
+
- **Endpoint:** GET /order/view
|
|
1526
|
+
- **Location:** `java-legacy/src/com/acme/web/OrderServlet.java:15`
|
|
1527
|
+
|
|
1528
|
+
**Evidence.**
|
|
1529
|
+
|
|
1530
|
+
- `java-legacy/src/com/acme/web/OrderServlet.java:15` — Order ID is taken from the request and used without checking ownership.
|
|
1531
|
+
`ResultSet rs = stmt.executeQuery("SELECT * FROM orders WHERE id = '" + id + "'");`
|
|
1532
|
+
|
|
1533
|
+
**Recommendation.** Verify that the order belongs to the current user before displaying.
|
|
1534
|
+
|
|
1535
|
+
*Verifier:* likely — checked: OrderServlet.java:13-15. The SQL statement uses the orderId request parameter without any comparison to the session user. No cast, allow‑list, or ownership helper is visible in the snippet.
|
|
1536
|
+
|
|
1537
|
+
### BOLA-R-0030 — BOLA in POST /admin/users/:id/delete: missing owner verification
|
|
1538
|
+
|
|
1539
|
+
- **Severity / confidence:** high / medium
|
|
1540
|
+
- **Status:** likely
|
|
1541
|
+
- **Category:** bola (missing_ownership_check) — CWE-284, CWE-639
|
|
1542
|
+
- **Endpoint:** POST /admin/users/:id/delete
|
|
1543
|
+
- **Location:** `node-express/routes/admin.js:9`
|
|
1544
|
+
|
|
1545
|
+
**Evidence.**
|
|
1546
|
+
|
|
1547
|
+
- `node-express/routes/admin.js:9` — Any logged‑in user can delete any user; no admin or ownership check.
|
|
1548
|
+
`User.deleteOne({ _id: req.params.id }, function () { res.sendStatus(204); });`
|
|
1549
|
+
|
|
1550
|
+
**Recommendation.** Restrict delete to admins or verify ownership.
|
|
1551
|
+
|
|
1552
|
+
*Verifier:* likely — checked: admin.js:8-9. The route applies only an ensureLoggedIn middleware; there is no admin role check or ownership verification before deleting a user.
|
|
1553
|
+
|
|
1554
|
+
### BOLA-R-0033-1 — BOLA in GET /orders/:id: missing owner verification
|
|
1555
|
+
|
|
1556
|
+
- **Severity / confidence:** high / medium
|
|
1557
|
+
- **Status:** likely
|
|
1558
|
+
- **Category:** bola (missing_ownership_check) — CWE-284, CWE-639
|
|
1559
|
+
- **Endpoint:** GET /orders/:id
|
|
1560
|
+
- **Location:** `node-express/routes/orders.js:8`
|
|
1561
|
+
|
|
1562
|
+
**Evidence.**
|
|
1563
|
+
|
|
1564
|
+
- `node-express/routes/orders.js:8` — The order ID comes from the request path and the query does not filter by the authenticated user.
|
|
1565
|
+
`Order.findById(req.params.id, function (err, order) { res.json(order); });`
|
|
1566
|
+
|
|
1567
|
+
**Recommendation.** Bind the query to the current session user.
|
|
1568
|
+
|
|
1569
|
+
*Verifier:* likely — checked: orders.js:8-9. The GET /orders/:id endpoint uses the request id directly in the query without filtering by the authenticated user. No ownership guard is present in the snippet.
|
|
1570
|
+
|
|
1571
|
+
### BOLA-R-0038-1 — BOLA in GET /stats: missing shop ownership verification
|
|
1572
|
+
|
|
1573
|
+
- **Severity / confidence:** high / medium
|
|
1574
|
+
- **Status:** likely
|
|
1575
|
+
- **Category:** bola (missing_ownership_check) — CWE-284, CWE-639
|
|
1576
|
+
- **Endpoint:** GET /stats
|
|
1577
|
+
- **Location:** `node-express/routes/orders.js:28`
|
|
1578
|
+
|
|
1579
|
+
**Evidence.**
|
|
1580
|
+
|
|
1581
|
+
- `node-express/routes/orders.js:28` — The shop_id is taken from the request query and the query does not verify that the shop belongs to the authenticated user.
|
|
1582
|
+
`db.query('SELECT COUNT(*) AS n FROM orders WHERE shop_id = ${req.query.shop}', function (e, r) { res.json(r); });`
|
|
1583
|
+
|
|
1584
|
+
**Recommendation.** Verify that the shop_id belongs to the current user before returning statistics.
|
|
1585
|
+
|
|
1586
|
+
*Verifier:* likely — checked: orders.js:28-29. The stats endpoint accepts a shop id from the query string and uses it directly in a SQL query. No ownership or admin check is visible in the provided context.
|
|
1587
|
+
|
|
1588
|
+
### BOLA-R-0043-1 — BOLA in Perl CGI order.cgi: missing user ownership verification
|
|
1589
|
+
|
|
1590
|
+
- **Severity / confidence:** high / high
|
|
1591
|
+
- **Status:** confirmed
|
|
1592
|
+
- **Category:** bola (missing_ownership_check) — CWE-284, CWE-639
|
|
1593
|
+
- **Endpoint:** ANY /perl-cgi/cgi-bin/order.cgi
|
|
1594
|
+
- **Location:** `perl-cgi/cgi-bin/order.cgi:11`
|
|
1595
|
+
|
|
1596
|
+
**Evidence.**
|
|
1597
|
+
|
|
1598
|
+
- `perl-cgi/cgi-bin/order.cgi:11` — The order ID is taken from the request and the query does not filter by the authenticated user.
|
|
1599
|
+
`$id = $q->param('id');
|
|
1600
|
+
$sth = $dbh->prepare("SELECT * FROM orders WHERE id = $id");
|
|
1601
|
+
$sth->execute();`
|
|
1602
|
+
|
|
1603
|
+
**Recommendation.** Add a user_id filter to the query.
|
|
1604
|
+
|
|
1605
|
+
*Verifier:* confirmed — checked: perl-cgi/cgi-bin/order.cgi: lines 11-17. The query at line 13 selects orders by id without filtering by user_id. No ownership check or parameter binding is present. The subsequent query with user_id is not used for the initial data retrieval.
|
|
1606
|
+
|
|
1607
|
+
### BOLA-R-0044-1 — BOLA in PHP CodeIgniter Invoice view: missing owner verification
|
|
1608
|
+
|
|
1609
|
+
- **Severity / confidence:** high / high
|
|
1610
|
+
- **Status:** confirmed
|
|
1611
|
+
- **Category:** bola (missing_ownership_check) — CWE-284, CWE-639
|
|
1612
|
+
- **Endpoint:** ANY /invoice/view/{id}
|
|
1613
|
+
- **Location:** `php-codeigniter/application/controllers/Invoice.php:9`
|
|
1614
|
+
|
|
1615
|
+
**Evidence.**
|
|
1616
|
+
|
|
1617
|
+
- `php-codeigniter/application/controllers/Invoice.php:9` — The invoice ID is taken from the request and the query does not filter by the authenticated user.
|
|
1618
|
+
`$q = $this->db->query("SELECT * FROM invoices WHERE id = $id");`
|
|
1619
|
+
|
|
1620
|
+
**Recommendation.** Add a user_id filter to the query.
|
|
1621
|
+
|
|
1622
|
+
*Verifier:* confirmed — checked: php-codeigniter/application/controllers/Invoice.php: lines 9-17. The view method executes a raw query with id only, no user_id filter. No ownership check is present.
|
|
1623
|
+
|
|
1624
|
+
### BOLA-R-0046-1 — BOLA in PHP CodeIgniter Invoice update: missing owner verification
|
|
1625
|
+
|
|
1626
|
+
- **Severity / confidence:** high / high
|
|
1627
|
+
- **Status:** confirmed
|
|
1628
|
+
- **Category:** bola (missing_ownership_check) — CWE-284, CWE-639
|
|
1629
|
+
- **Endpoint:** ANY /invoice/update
|
|
1630
|
+
- **Location:** `php-codeigniter/application/controllers/Invoice.php:20`
|
|
1631
|
+
|
|
1632
|
+
**Evidence.**
|
|
1633
|
+
|
|
1634
|
+
- `php-codeigniter/application/controllers/Invoice.php:20` — The invoice ID is taken from the request and the update does not verify that the invoice belongs to the authenticated user.
|
|
1635
|
+
`$this->db->query("UPDATE invoices SET note = ? WHERE id = ?", array($note, $id));`
|
|
1636
|
+
|
|
1637
|
+
**Recommendation.** Add a user_id filter to the update query.
|
|
1638
|
+
|
|
1639
|
+
*Verifier:* confirmed — checked: php-codeigniter/application/controllers/Invoice.php: lines 20-23. The update query uses id from POST without verifying ownership. No ownership check is present.
|
|
1640
|
+
|
|
1641
|
+
### BOLA-R-0053 — Needs review: POST /posts – ownership check unknown
|
|
1642
|
+
|
|
1643
|
+
- **Severity / confidence:** high / medium
|
|
1644
|
+
- **Status:** likely
|
|
1645
|
+
- **Category:** bola (missing_ownership_check) — CWE-639
|
|
1646
|
+
- **Endpoint:** POST /posts
|
|
1647
|
+
- **Location:** `php-laravel/routes/web.php:7`
|
|
1648
|
+
|
|
1649
|
+
**Evidence.**
|
|
1650
|
+
|
|
1651
|
+
- `php-laravel/routes/web.php:7` — Controller code not visible; cannot confirm ownership enforcement
|
|
1652
|
+
`Route::post('/posts', [AccountController::class, 'post']);`
|
|
1653
|
+
|
|
1654
|
+
**Recommendation.** Verify that the post creation associates the post with the current user and that updates/deletes check ownership
|
|
1655
|
+
|
|
1656
|
+
*Verifier:* likely — checked: php-laravel/routes/web.php line 7. The route definition does not show any ownership or authentication check; controller code is not visible.
|
|
1657
|
+
|
|
1658
|
+
### BOLA-R-0054 — Needs review: POST /teams – ownership check unknown
|
|
1659
|
+
|
|
1660
|
+
- **Severity / confidence:** high / medium
|
|
1661
|
+
- **Status:** likely
|
|
1662
|
+
- **Category:** bola (missing_ownership_check) — CWE-639
|
|
1663
|
+
- **Endpoint:** POST /teams
|
|
1664
|
+
- **Location:** `php-laravel/routes/web.php:8`
|
|
1665
|
+
|
|
1666
|
+
**Evidence.**
|
|
1667
|
+
|
|
1668
|
+
- `php-laravel/routes/web.php:8` — Controller code not visible; cannot confirm ownership enforcement
|
|
1669
|
+
`Route::post('/teams', [AccountController::class, 'team']);`
|
|
1670
|
+
|
|
1671
|
+
**Recommendation.** Verify that team operations enforce that the current user owns or is a member of the team
|
|
1672
|
+
|
|
1673
|
+
*Verifier:* likely — checked: php-laravel/routes/web.php line 8. The route definition does not reveal any ownership or authentication check; controller code is not visible.
|
|
1674
|
+
|
|
1675
|
+
### BOLA-R-0055 — Needs review: POST /account/rename – ownership check unknown
|
|
1676
|
+
|
|
1677
|
+
- **Severity / confidence:** high / medium
|
|
1678
|
+
- **Status:** likely
|
|
1679
|
+
- **Category:** bola (missing_ownership_check) — CWE-639
|
|
1680
|
+
- **Endpoint:** POST /account/rename
|
|
1681
|
+
- **Location:** `php-laravel/routes/web.php:9`
|
|
1682
|
+
|
|
1683
|
+
**Evidence.**
|
|
1684
|
+
|
|
1685
|
+
- `php-laravel/routes/web.php:9` — Controller code not visible; cannot confirm ownership enforcement
|
|
1686
|
+
`Route::post('/account/rename', [AccountController::class, 'rename']);`
|
|
1687
|
+
|
|
1688
|
+
**Recommendation.** Verify that the rename action checks that the target account belongs to the current user
|
|
1689
|
+
|
|
1690
|
+
*Verifier:* likely — checked: php-laravel/routes/web.php line 9. The route definition does not show any ownership or authentication check; controller code is not visible.
|
|
1691
|
+
|
|
1692
|
+
### BOLA-R-0056 — Needs review: POST /account/profile – ownership check unknown
|
|
1693
|
+
|
|
1694
|
+
- **Severity / confidence:** high / medium
|
|
1695
|
+
- **Status:** likely
|
|
1696
|
+
- **Category:** bola (missing_ownership_check) — CWE-639
|
|
1697
|
+
- **Endpoint:** POST /account/profile
|
|
1698
|
+
- **Location:** `php-laravel/routes/web.php:10`
|
|
1699
|
+
|
|
1700
|
+
**Evidence.**
|
|
1701
|
+
|
|
1702
|
+
- `php-laravel/routes/web.php:10` — Controller code not visible; cannot confirm ownership enforcement
|
|
1703
|
+
`Route::post('/account/profile', [AccountController::class, 'profile']);`
|
|
1704
|
+
|
|
1705
|
+
**Recommendation.** Verify that the profile update checks that the target profile belongs to the current user
|
|
1706
|
+
|
|
1707
|
+
*Verifier:* likely — checked: php-laravel/routes/web.php line 10. The route definition does not reveal any ownership or authentication check; controller code is not visible.
|
|
1708
|
+
|
|
1709
|
+
### BOLA-R-0057 — BOLA in GET|POST /php-plain/admin.php?action=view: missing owner verification
|
|
1710
|
+
|
|
1711
|
+
- **Severity / confidence:** high / high
|
|
1712
|
+
- **Status:** confirmed
|
|
1713
|
+
- **Category:** bola (missing_ownership_check) — CWE-639, CWE-284
|
|
1714
|
+
- **Endpoint:** GET|POST /php-plain/admin.php?action=view
|
|
1715
|
+
- **Location:** `php-plain/admin.php:6`
|
|
1716
|
+
|
|
1717
|
+
**Evidence.**
|
|
1718
|
+
|
|
1719
|
+
- `php-plain/admin.php:7` — ID comes from request
|
|
1720
|
+
`$uid = (int)$_GET['uid'];`
|
|
1721
|
+
- `php-plain/admin.php:8` — No owner check; any logged‑in user can view any user
|
|
1722
|
+
`$r = mysql_query("SELECT * FROM users WHERE id = " . $uid);`
|
|
1723
|
+
|
|
1724
|
+
**Recommendation.** Bind query to current session user
|
|
1725
|
+
|
|
1726
|
+
*Verifier:* confirmed — checked: php-plain/admin.php: lines 6-8, php-plain/inc/auth.php: lines 1-7. The view case retrieves a user by uid from GET without checking that the uid matches the logged‑in user. No ownership check is present.
|
|
1727
|
+
|
|
1728
|
+
### BOLA-R-0058 — BOLA in GET|POST /php-plain/admin.php?action=delete: missing owner verification
|
|
1729
|
+
|
|
1730
|
+
- **Severity / confidence:** high / high
|
|
1731
|
+
- **Status:** confirmed
|
|
1732
|
+
- **Category:** bola (missing_ownership_check) — CWE-639, CWE-284
|
|
1733
|
+
- **Endpoint:** GET|POST /php-plain/admin.php?action=delete
|
|
1734
|
+
- **Location:** `php-plain/admin.php:10`
|
|
1735
|
+
|
|
1736
|
+
**Evidence.**
|
|
1737
|
+
|
|
1738
|
+
- `php-plain/admin.php:11` — ID comes from request
|
|
1739
|
+
`$id = $_POST['id'];`
|
|
1740
|
+
- `php-plain/admin.php:12` — No owner check; any logged‑in user can delete any user
|
|
1741
|
+
`mysql_query("DELETE FROM users WHERE id = $id");`
|
|
1742
|
+
|
|
1743
|
+
**Recommendation.** Bind delete to current session user
|
|
1744
|
+
|
|
1745
|
+
*Verifier:* confirmed — checked: php-plain/admin.php: lines 10-12, php-plain/inc/auth.php: lines 1-7. The delete case deletes a user by id from POST without verifying ownership. No ownership check is present.
|
|
1746
|
+
|
|
1747
|
+
### BOLA-R-0059 — BOLA in POST /php-plain/manage_users.php: missing owner verification
|
|
1748
|
+
|
|
1749
|
+
- **Severity / confidence:** high / high
|
|
1750
|
+
- **Status:** confirmed
|
|
1751
|
+
- **Category:** bola (missing_ownership_check) — CWE-639, CWE-284
|
|
1752
|
+
- **Endpoint:** POST /php-plain/manage_users.php
|
|
1753
|
+
- **Location:** `php-plain/manage_users.php:5`
|
|
1754
|
+
|
|
1755
|
+
**Evidence.**
|
|
1756
|
+
|
|
1757
|
+
- `php-plain/manage_users.php:5` — ID comes from request
|
|
1758
|
+
`if ($_SERVER['REQUEST_METHOD'] === 'POST') {`
|
|
1759
|
+
- `php-plain/manage_users.php:6` — No owner check; any logged‑in user can delete any user
|
|
1760
|
+
`$stmt = $db->prepare("DELETE FROM users WHERE id = ?");`
|
|
1761
|
+
|
|
1762
|
+
**Recommendation.** Bind delete to current session user
|
|
1763
|
+
|
|
1764
|
+
*Verifier:* confirmed — checked: php-plain/manage_users.php. The POST handler deletes a user by id without any ownership or role check; only authentication is enforced by the included auth.php.
|
|
1765
|
+
|
|
1766
|
+
### BOLA-R-0061 — BOLA in GET /php-plain/order_detail.php: missing owner verification
|
|
1767
|
+
|
|
1768
|
+
- **Severity / confidence:** high / high
|
|
1769
|
+
- **Status:** confirmed
|
|
1770
|
+
- **Category:** bola (missing_ownership_check) — CWE-639, CWE-284
|
|
1771
|
+
- **Endpoint:** GET /php-plain/order_detail.php
|
|
1772
|
+
- **Location:** `php-plain/order_detail.php:5`
|
|
1773
|
+
|
|
1774
|
+
**Evidence.**
|
|
1775
|
+
|
|
1776
|
+
- `php-plain/order_detail.php:5` — ID comes from request
|
|
1777
|
+
`$id = $_GET['id'];`
|
|
1778
|
+
- `php-plain/order_detail.php:6` — No owner check; any logged‑in user can view any order
|
|
1779
|
+
`$res = mysql_query("SELECT * FROM orders WHERE id = " . $id);`
|
|
1780
|
+
|
|
1781
|
+
**Recommendation.** Bind query to current session user
|
|
1782
|
+
|
|
1783
|
+
*Verifier:* confirmed — checked: php-plain/order_detail.php. The order detail page queries orders by id directly from $_GET without verifying that the order belongs to the current session user.
|
|
1784
|
+
|
|
1785
|
+
### BOLA-R-0066 — BOLA in POST /php-plain/admin/delete_user.php: missing owner verification
|
|
1786
|
+
|
|
1787
|
+
- **Severity / confidence:** high / high
|
|
1788
|
+
- **Status:** confirmed
|
|
1789
|
+
- **Category:** bola (missing_ownership_check) — CWE-639, CWE-284
|
|
1790
|
+
- **Endpoint:** POST /php-plain/admin/delete_user.php
|
|
1791
|
+
- **Location:** `php-plain/admin/delete_user.php:5`
|
|
1792
|
+
|
|
1793
|
+
**Evidence.**
|
|
1794
|
+
|
|
1795
|
+
- `php-plain/admin/delete_user.php:5` — ID comes from request
|
|
1796
|
+
`$id = (int)$_POST['id'];`
|
|
1797
|
+
- `php-plain/admin/delete_user.php:6` — No owner check; any logged‑in user can delete any user
|
|
1798
|
+
`$stmt = $db->prepare("DELETE FROM users WHERE id = ?");`
|
|
1799
|
+
|
|
1800
|
+
**Recommendation.** Bind delete to current session user
|
|
1801
|
+
|
|
1802
|
+
*Verifier:* confirmed — checked: php-plain/admin/delete_user.php. The file contains only a login check via require_once '../inc/auth.php'; no ownership or role verification is performed before executing the DELETE statement.
|
|
1803
|
+
|
|
1804
|
+
### BOLA-R-0067 — BOLA in POST /php-plain/admin/promote.php: missing owner verification
|
|
1805
|
+
|
|
1806
|
+
- **Severity / confidence:** high / high
|
|
1807
|
+
- **Status:** confirmed
|
|
1808
|
+
- **Category:** bola (missing_ownership_check) — CWE-639, CWE-284
|
|
1809
|
+
- **Endpoint:** POST /php-plain/admin/promote.php
|
|
1810
|
+
- **Location:** `php-plain/admin/promote.php:5`
|
|
1811
|
+
|
|
1812
|
+
**Evidence.**
|
|
1813
|
+
|
|
1814
|
+
- `php-plain/admin/promote.php:5` — ID comes from request
|
|
1815
|
+
`if ($_POST['is_admin'] == '1') {`
|
|
1816
|
+
- `php-plain/admin/promote.php:6` — No owner check; any logged‑in user can promote any user
|
|
1817
|
+
`$stmt = $db->prepare("UPDATE users SET role = 'admin' WHERE id = ?");`
|
|
1818
|
+
|
|
1819
|
+
**Recommendation.** Bind role change to current session user
|
|
1820
|
+
|
|
1821
|
+
*Verifier:* confirmed — checked: php-plain/admin/promote.php. Only a login check is performed; the UPDATE statement changes a user's role based solely on the supplied id, with no ownership or role guard.
|
|
1822
|
+
|
|
1823
|
+
### BOLA-R-0069 — BOLA in GET /orders/<int:order_id>: missing owner verification
|
|
1824
|
+
|
|
1825
|
+
- **Severity / confidence:** high / high
|
|
1826
|
+
- **Status:** confirmed
|
|
1827
|
+
- **Category:** bola (missing_ownership_check) — CWE-639, CWE-284
|
|
1828
|
+
- **Endpoint:** GET /orders/<int:order_id>
|
|
1829
|
+
- **Location:** `python-flask/app.py:12`
|
|
1830
|
+
|
|
1831
|
+
**Evidence.**
|
|
1832
|
+
|
|
1833
|
+
- `python-flask/app.py:12` — No owner check; any logged‑in user can view any order
|
|
1834
|
+
`cur.execute("SELECT * FROM orders WHERE id = %s" % order_id)`
|
|
1835
|
+
|
|
1836
|
+
**Recommendation.** Bind query to current user
|
|
1837
|
+
|
|
1838
|
+
*Verifier:* confirmed — checked: python-flask/app.py. The route '/orders/<int:order_id>' executes a raw SQL query with the id interpolated directly; no ownership check is performed before returning the result.
|
|
1839
|
+
|
|
1840
|
+
### BOLA-R-0073 — BOLA in POST /users/<int:uid>/name: missing owner verification
|
|
1841
|
+
|
|
1842
|
+
- **Severity / confidence:** high / high
|
|
1843
|
+
- **Status:** confirmed
|
|
1844
|
+
- **Category:** bola (no_authentication) — CWE-284, CWE-639
|
|
1845
|
+
- **Endpoint:** POST /users/<int:uid>/name
|
|
1846
|
+
- **Location:** `python-flask/profile.py:16`
|
|
1847
|
+
|
|
1848
|
+
**Evidence.**
|
|
1849
|
+
|
|
1850
|
+
- `python-flask/profile.py:16` — The user ID comes from the URL and is used directly to load and update a user record without any check that the ID belongs to the authenticated user.
|
|
1851
|
+
`def rename(uid):
|
|
1852
|
+
user = User.query.get(uid)
|
|
1853
|
+
user.name = request.json["name"]
|
|
1854
|
+
db.session.commit()
|
|
1855
|
+
return jsonify(ok=True)`
|
|
1856
|
+
|
|
1857
|
+
**Recommendation.** Bind the update to the current session user and reject mismatches.
|
|
1858
|
+
|
|
1859
|
+
*Verifier:* confirmed — checked: python-flask/profile.py lines 16-20. The handler directly loads a user by the URL‑supplied UID and updates the name without any authentication or ownership verification.
|
|
1860
|
+
|
|
1861
|
+
### BOLA-R-0074 — BOLA in PATCH /users/<int:uid>: missing owner verification
|
|
1862
|
+
|
|
1863
|
+
- **Severity / confidence:** high / medium
|
|
1864
|
+
- **Status:** likely
|
|
1865
|
+
- **Category:** bola (no_authentication) — CWE-284, CWE-639
|
|
1866
|
+
- **Endpoint:** PATCH /users/<int:uid>
|
|
1867
|
+
- **Location:** `python-flask/profile.py:24`
|
|
1868
|
+
|
|
1869
|
+
**Evidence.**
|
|
1870
|
+
|
|
1871
|
+
- `python-flask/profile.py:24` — The user ID is taken from the URL and used to load a user record without verifying that the ID belongs to the authenticated user.
|
|
1872
|
+
`def patch(uid):
|
|
1873
|
+
user = User.query.get(uid)
|
|
1874
|
+
for key, value in request.json.items():
|
|
1875
|
+
setattr(user, key, value)
|
|
1876
|
+
db.session.commit()
|
|
1877
|
+
return jsonify(ok=True)`
|
|
1878
|
+
|
|
1879
|
+
**Recommendation.** Verify that the target user ID matches the current session user before applying changes.
|
|
1880
|
+
|
|
1881
|
+
*Verifier:* likely — checked: python-flask/profile.py lines 24-30. The PATCH endpoint loads a user by ID and updates it without any visible authentication or ownership check. The Auth Model does not cover the python‑flask sub‑application, and no global filter or middleware is shown in the code_context.
|
|
1882
|
+
|
|
1883
|
+
## 4. Systemic fixes
|
|
1884
|
+
|
|
1885
|
+
<!-- LLM: reporter agent writes max 5 systemic fixes here -->
|
|
1886
|
+
|
|
1887
|
+
## 5. Coverage and limitations
|
|
1888
|
+
|
|
1889
|
+
- missing from inventory: 0
|
|
1890
|
+
- bola routes without verdict: 0
|
|
1891
|
+
- injection candidates without verdict: 1 (I-0021)
|
|
1892
|
+
- bfla routes without verdict: 0
|
|
1893
|
+
- mass candidates without verdict: 0
|
|
1894
|
+
- findings without verification: 0
|
|
1895
|
+
|
|
1896
|
+
<!-- LLM: reporter agent lists limitations here -->
|
|
1897
|
+
|
|
1898
|
+
## Appendix A — Findings rejected by the verifier
|
|
1899
|
+
|
|
1900
|
+
| ID | Location | Reason |
|
|
1901
|
+
|---|---|---|
|
|
1902
|
+
| INJ-I-0005 | `classic-asp/shop/order.asp:12` | The sid value is cast to a long integer before concatenation, preventing SQL injection. The user_id is also cast to CLng(Session("UserID")). |
|
|
1903
|
+
|
|
1904
|
+
## Appendix B — Method
|
|
1905
|
+
|
|
1906
|
+
1. Deterministic pre-scan (stack detection, endpoint candidates, query-building candidates).
|
|
1907
|
+
2. AI agents: auth-model extraction, route inventory, BOLA audit, injection audit.
|
|
1908
|
+
3. Independent AI verifier tries to refute each finding.
|
|
1909
|
+
4. Human review and sign-off (`review-log.md`).
|
|
1910
|
+
|
|
1911
|
+
This is not a penetration test. Absence of findings does not prove absence of vulnerabilities.
|