mirror of
https://github.com/norandom/OpenUltraSAST.git
synced 2026-10-16 03:49:26 +00:00
feat(propose-adjudicate-prove): overlay adjudicates inventory before prove
Regex inventory stays the proposer. MAP attaches promote/demote/unadjudicated/coverage from intra-file taint (tree-sitter when a grammar parses, Python ast as last resort). Deep sandboxes promotions only, ordered by the existing heuristic ranker plus optional OpenRouter mechanism recall. The SAST pair slice scores overlay outcomes; the stage-1 detection gate and local pair gate stay inventory-only.
This commit is contained in:
@@ -0,0 +1,51 @@
|
||||
# Vuln vs fixed pair corpus
|
||||
|
||||
This corpus measures harness **efficiency**, not cheat-sheet recall.
|
||||
|
||||
The stage-1 smoke gate (`python -m openultrasast.gate`) scans one tree that
|
||||
already contains the planted sinks. A pair eval instead scans **two isolated
|
||||
trees**:
|
||||
|
||||
1. **vuln** — only the vulnerable file. The harness should fire (true positive).
|
||||
2. **fixed** — only the patched file, same relative path. The harness should stay
|
||||
silent on that CWE (true negative).
|
||||
|
||||
`pair_correct` = detected on vuln **and** silent on the fix. That is the signal
|
||||
the improvement loop consumes (`miss` on the vuln side, `fp` on the fix side).
|
||||
|
||||
## Layout
|
||||
|
||||
| Path | Role |
|
||||
| --- | --- |
|
||||
| `catalog.toml` | Runnable offline pairs (local fixtures + vendored GitHub functions) |
|
||||
| `datasets.toml` | Pointers to public VFC datasets — do not vendor the dumps |
|
||||
| `datasets/cwe-bench-java-project_info.csv` | 120 vetted Java CVE buggy/fix commits |
|
||||
| `github/` | Isolated function excerpts with provenance headers |
|
||||
|
||||
Pairs in this directory **must not** join `LANGUAGE_MANIFESTS`.
|
||||
|
||||
## Slices
|
||||
|
||||
- **local** — in-tree fixture counterparts (`app.py` vs `safe.py`, …). CI gate:
|
||||
every local pair must pass (`python -m openultrasast.pair_gate`).
|
||||
- **github** — real commit/function pairs (SVEN, CWE-Bench-Java, NVD patterns).
|
||||
Measured, not a 90% smoke gate. Misses here are the honesty / evolve-the-harness
|
||||
dashboard.
|
||||
- **sast** — OWASP Benchmark Java/Python true-vs-false files and Juliet
|
||||
bad-vs-good sinks (`benchmarks/pairs/sast/`). Score is Youden (TPR − FPR).
|
||||
Honesty dashboard, not a CI fail.
|
||||
|
||||
## Commands
|
||||
|
||||
```bash
|
||||
uv run ousast pairs
|
||||
uv run ousast pairs --slice github --json
|
||||
uv run python -m openultrasast.pair_gate
|
||||
```
|
||||
|
||||
## Growing the corpus
|
||||
|
||||
Prefer function-level before/after from a reviewed source (SVEN jsonl, a
|
||||
CWE-Bench-Java `fix_info.csv` row, a GHSA with a tiny patch). Isolate the
|
||||
changed function into `vuln` / `fixed` files with the same `relpath`. Leave
|
||||
whole-repo clones to `--fetch` later; CI stays offline.
|
||||
@@ -0,0 +1,181 @@
|
||||
# Vuln-vs-fixed pair catalog. Isolated trees: the scanner sees only the vuln
|
||||
# file or only the fixed file, never both. Do not add these names to
|
||||
# LANGUAGE_MANIFESTS (stage-1 90% smoke gate stays on cheat-sheet fixtures).
|
||||
|
||||
[[pair]]
|
||||
name = "local-python-vulnerable"
|
||||
slice = "local"
|
||||
language = "python"
|
||||
origin = "in-tree-fixture"
|
||||
license = "in-tree"
|
||||
vuln = "../fixtures/python-vulnerable/app.py"
|
||||
fixed = "../fixtures/python-vulnerable/safe.py"
|
||||
relpath = "app.py"
|
||||
expected_from = "../manifests/python-vulnerable.toml"
|
||||
min_recall = 1.0
|
||||
fix_policy = "silent"
|
||||
|
||||
[[pair]]
|
||||
name = "local-javascript-vulnerable"
|
||||
slice = "local"
|
||||
language = "javascript"
|
||||
origin = "in-tree-fixture"
|
||||
license = "in-tree"
|
||||
vuln = "../fixtures/javascript-vulnerable/src/app.js"
|
||||
fixed = "../fixtures/javascript-vulnerable/src/safe.js"
|
||||
relpath = "src/app.js"
|
||||
expected_from = "../manifests/javascript-vulnerable.toml"
|
||||
min_recall = 1.0
|
||||
fix_policy = "silent"
|
||||
|
||||
[[pair]]
|
||||
name = "local-cpp-buffer"
|
||||
slice = "local"
|
||||
language = "c_cpp"
|
||||
origin = "in-tree-fixture"
|
||||
license = "in-tree"
|
||||
vuln = "../fixtures/cpp-damn-vulnerable/src/buffer.cpp"
|
||||
fixed = "../fixtures/cpp-damn-vulnerable/src/safe.cpp"
|
||||
relpath = "src/buffer.cpp"
|
||||
expected_from = "../manifests/cpp-damn-vulnerable.toml"
|
||||
min_recall = 1.0
|
||||
fix_policy = "silent"
|
||||
|
||||
[[pair]]
|
||||
name = "sven-cwe-078-os-system"
|
||||
slice = "github"
|
||||
language = "python"
|
||||
origin = "sven"
|
||||
license = "original-project"
|
||||
repo = "Internet-of-People/titania-os"
|
||||
commit = "9b7805119938343fcac9dc929d8882f1d97cf14a"
|
||||
commit_url = "https://github.com/Internet-of-People/titania-os/commit/9b7805119938343fcac9dc929d8882f1d97cf14a"
|
||||
vuln = "github/sven-cwe-078-os-system/vuln.py"
|
||||
fixed = "github/sven-cwe-078-os-system/fixed.py"
|
||||
relpath = "vuedj/configtitania/views.py"
|
||||
min_recall = 1.0
|
||||
fix_policy = "silent"
|
||||
|
||||
[[pair.expected]]
|
||||
cwe = "CWE-78"
|
||||
class = "command injection"
|
||||
path = "vuedj/configtitania/views.py"
|
||||
rule_id = "python-os-command"
|
||||
sink = "os.system"
|
||||
evidence = "os.system concatenates attacker-controlled username into a shell command"
|
||||
|
||||
[[pair]]
|
||||
name = "sven-cwe-078-shell-true"
|
||||
slice = "github"
|
||||
language = "python"
|
||||
origin = "sven"
|
||||
license = "Apache-2.0"
|
||||
repo = "google/mobly"
|
||||
commit = "3862e8ba359040fbdd6e1a6d36e51d07cda8e1ee"
|
||||
commit_url = "https://github.com/google/mobly/commit/3862e8ba359040fbdd6e1a6d36e51d07cda8e1ee"
|
||||
vuln = "github/sven-cwe-078-shell-true/vuln.py"
|
||||
fixed = "github/sven-cwe-078-shell-true/fixed.py"
|
||||
relpath = "mobly/controllers/android_device_lib/adb.py"
|
||||
min_recall = 1.0
|
||||
fix_policy = "silent"
|
||||
|
||||
[[pair.expected]]
|
||||
cwe = "CWE-78"
|
||||
class = "command injection"
|
||||
path = "mobly/controllers/android_device_lib/adb.py"
|
||||
rule_id = "python-shell-true"
|
||||
sink = "subprocess"
|
||||
evidence = "subprocess.Popen runs the command with shell=True"
|
||||
|
||||
[[pair]]
|
||||
name = "sven-cwe-089-execute-percent"
|
||||
slice = "github"
|
||||
language = "python"
|
||||
origin = "sven"
|
||||
license = "original-project"
|
||||
repo = "russ-lewis/ttt_-_python_cgi"
|
||||
commit = "6096f43fd4b2d91211eec4614b7960c0816900da"
|
||||
commit_url = "https://github.com/russ-lewis/ttt_-_python_cgi/commit/6096f43fd4b2d91211eec4614b7960c0816900da"
|
||||
vuln = "github/sven-cwe-089-execute-percent/vuln.py"
|
||||
fixed = "github/sven-cwe-089-execute-percent/fixed.py"
|
||||
relpath = "cgi/common.py"
|
||||
min_recall = 1.0
|
||||
fix_policy = "silent"
|
||||
|
||||
[[pair.expected]]
|
||||
cwe = "CWE-89"
|
||||
class = "sql injection"
|
||||
path = "cgi/common.py"
|
||||
rule_id = "python-sql-injection"
|
||||
sink = "execute"
|
||||
evidence = "execute percent-formats attacker-controlled input into SQL"
|
||||
|
||||
[[pair]]
|
||||
name = "sven-cwe-089-query-concat"
|
||||
slice = "github"
|
||||
language = "python"
|
||||
origin = "sven"
|
||||
license = "original-project"
|
||||
repo = "pukkapies/urop2019"
|
||||
commit = "3ca2e2c291d2d5fe262d20a8e0520bdfb622432b"
|
||||
commit_url = "https://github.com/pukkapies/urop2019/commit/3ca2e2c291d2d5fe262d20a8e0520bdfb622432b"
|
||||
vuln = "github/sven-cwe-089-query-concat/vuln.py"
|
||||
fixed = "github/sven-cwe-089-query-concat/fixed.py"
|
||||
relpath = "modules/query_lastfm.py"
|
||||
min_recall = 1.0
|
||||
fix_policy = "silent"
|
||||
|
||||
[[pair.expected]]
|
||||
cwe = "CWE-89"
|
||||
class = "sql injection"
|
||||
path = "modules/query_lastfm.py"
|
||||
sink = "SELECT"
|
||||
evidence = "SQL query concatenates attacker-controlled tag_num"
|
||||
|
||||
[[pair]]
|
||||
name = "hutool-cve-2018-17297"
|
||||
slice = "github"
|
||||
language = "java"
|
||||
origin = "cwe-bench-java"
|
||||
license = "MulanPSL-2.0"
|
||||
repo = "dromara/hutool"
|
||||
cve = "CVE-2018-17297"
|
||||
cwe = "CWE-22"
|
||||
commit = "8d7d0b7fb5ea4f7447b40131bffc1ec506a6528e"
|
||||
parent = "fd77bb8718648f69a587046b735488a80123cc26"
|
||||
commit_url = "https://github.com/dromara/hutool/commit/8d7d0b7fb5ea4f7447b40131bffc1ec506a6528e"
|
||||
vuln = "github/hutool-cve-2018-17297/vuln/ZipUtil.java"
|
||||
fixed = "github/hutool-cve-2018-17297/fixed/ZipUtil.java"
|
||||
relpath = "cn/hutool/core/util/ZipUtil.java"
|
||||
min_recall = 1.0
|
||||
fix_policy = "silent"
|
||||
|
||||
[[pair.expected]]
|
||||
cwe = "CWE-22"
|
||||
class = "path traversal"
|
||||
path = "cn/hutool/core/util/ZipUtil.java"
|
||||
sink = "ZipEntry"
|
||||
evidence = "zip entry name is joined onto the extract directory without a zip-slip check"
|
||||
|
||||
[[pair]]
|
||||
name = "node-serialize-cve-2017-5941"
|
||||
slice = "github"
|
||||
language = "javascript"
|
||||
origin = "nvd"
|
||||
license = "public-advisory-pattern"
|
||||
cve = "CVE-2017-5941"
|
||||
cwe = "CWE-95"
|
||||
commit_url = "https://nvd.nist.gov/vuln/detail/CVE-2017-5941"
|
||||
vuln = "github/node-serialize-cve-2017-5941/vuln.js"
|
||||
fixed = "github/node-serialize-cve-2017-5941/fixed.js"
|
||||
relpath = "index.js"
|
||||
min_recall = 1.0
|
||||
fix_policy = "silent"
|
||||
|
||||
[[pair.expected]]
|
||||
cwe = "CWE-95"
|
||||
class = "code injection"
|
||||
path = "index.js"
|
||||
rule_id = "js-eval"
|
||||
sink = "eval"
|
||||
evidence = "eval executes attacker-controlled serialized input"
|
||||
@@ -0,0 +1,124 @@
|
||||
# External vulnerability-fixing-commit (VFC) datasets. Metadata only — these
|
||||
# dumps are too large / too noisy to vendor. Use them to grow the pair catalog.
|
||||
# Label accuracy on auto-mined function datasets is often well below 100%
|
||||
# (DiverseVul sampled ~60% correct "vulnerable" labels). Prefer manually
|
||||
# vetted sets (CWE-Bench-Java, Vul4J, SVEN) when evolving the harness.
|
||||
|
||||
[[dataset]]
|
||||
name = "OWASP Benchmark Java"
|
||||
url = "https://github.com/OWASP-Benchmark/BenchmarkJava"
|
||||
data = "benchmarks/pairs/sast/owasp-java"
|
||||
level = "file"
|
||||
languages = ["Java"]
|
||||
notes = "Official SAST/DAST/IAST scorecard. 2740 labeled true/false cases, 11 CWEs. Score = TPR - FPR (Youden). Vendored slice under sast/owasp-java."
|
||||
|
||||
[[dataset]]
|
||||
name = "OWASP Benchmark Python"
|
||||
url = "https://github.com/OWASP-Benchmark/BenchmarkPython"
|
||||
data = "benchmarks/pairs/sast/owasp-python"
|
||||
level = "file"
|
||||
languages = ["Python"]
|
||||
notes = "Python counterpart of OWASP Benchmark (expectedresults-0.1.csv, Flask testcode/). Same true/false scoring protocol. Vendored slice under sast/owasp-python."
|
||||
|
||||
[[dataset]]
|
||||
name = "Juliet Test Suite C/C++"
|
||||
url = "https://github.com/arichardson/juliet-test-suite-c"
|
||||
data = "benchmarks/pairs/sast/juliet-c"
|
||||
level = "function"
|
||||
languages = ["C/C++"]
|
||||
notes = "NIST SARD Juliet 1.3. Each case has bad() and goodG2B/goodB2G. CC0. The arichardson mirror is a memory-safety subset; CWE-78 lives in the full NIST zip / Juliet Java."
|
||||
|
||||
[[dataset]]
|
||||
name = "Juliet Test Suite Java"
|
||||
url = "https://github.com/UnitTestBot/juliet-java-test-suite"
|
||||
data = "benchmarks/pairs/sast/juliet-java"
|
||||
level = "function"
|
||||
languages = ["Java"]
|
||||
notes = "NIST Juliet Java 1.3, 112 CWEs including CWE-78 and CWE-89. CC0. Vendored slice extracts bad vs goodG2B sinks."
|
||||
|
||||
[[dataset]]
|
||||
name = "CVEfixes"
|
||||
url = "https://github.com/secureIT-project/CVEfixes"
|
||||
data = "https://doi.org/10.5281/zenodo.4476563"
|
||||
level = "commit/file/function"
|
||||
languages = ["multi"]
|
||||
notes = "NVD-linked CVE fix commits. v1.0.8: 11873 CVEs, 12107 commits, 4249 projects. CC BY 4.0 data."
|
||||
|
||||
[[dataset]]
|
||||
name = "MoreFixes"
|
||||
url = "https://github.com/secureIT-project/MoreFixes"
|
||||
level = "commit/file/method"
|
||||
languages = ["C/C++", "Java", "Python", "JavaScript"]
|
||||
notes = "Largest language-independent CVE-fix set (~26617 CVEs, ~31883 commits). Method-level CSVs also on Kaggle."
|
||||
|
||||
[[dataset]]
|
||||
name = "DiverseVul"
|
||||
url = "https://github.com/wagner-group/diversevul"
|
||||
level = "function"
|
||||
languages = ["C/C++"]
|
||||
notes = "18945 vuln functions / 150 CWEs. Sampled label accuracy ~60%. Do not treat as ground truth without review."
|
||||
|
||||
[[dataset]]
|
||||
name = "PrimeVul"
|
||||
url = "https://github.com/DLVulDet/PrimeVul"
|
||||
level = "function"
|
||||
languages = ["C/C++"]
|
||||
notes = "Relabeled DiverseVul/CVEFixes-style pairs with stricter commit-function alignment."
|
||||
|
||||
[[dataset]]
|
||||
name = "MegaVul"
|
||||
url = "https://github.com/Icyrockton/MegaVul"
|
||||
level = "function"
|
||||
languages = ["C/C++"]
|
||||
notes = "Large C/C++ function pair set (vuln vs after-fix)."
|
||||
|
||||
[[dataset]]
|
||||
name = "CWE-Bench-Java"
|
||||
url = "https://github.com/iris-sast/cwe-bench-java"
|
||||
data = "benchmarks/pairs/datasets/cwe-bench-java-project_info.csv"
|
||||
level = "project/commit"
|
||||
languages = ["Java"]
|
||||
notes = "120 manually vetted CVEs (CWE-22/78/79/94) with buggy_commit_id and fix_commit_ids. IRIS paper."
|
||||
|
||||
[[dataset]]
|
||||
name = "Vul4J"
|
||||
url = "https://github.com/tuhh-softsec/vul4j"
|
||||
level = "project"
|
||||
languages = ["Java"]
|
||||
notes = "Reproducible Java vulns with human patches and PoV tests. CC-BY-4.0 dataset."
|
||||
|
||||
[[dataset]]
|
||||
name = "SVEN"
|
||||
url = "https://github.com/eth-sri/sven"
|
||||
data = "https://github.com/eth-sri/sven/tree/master/data_train_val"
|
||||
level = "function"
|
||||
languages = ["Python", "C/C++"]
|
||||
notes = "Manually curated before/after functions (CWE-22/78/79/89/...). Train jsonl is the pair source for several vendored cases."
|
||||
|
||||
[[dataset]]
|
||||
name = "vfc_datasets"
|
||||
url = "https://github.com/UzL-ITS/vfc_datasets"
|
||||
level = "toolkit"
|
||||
languages = ["multi"]
|
||||
notes = "Unified loader over 22 commit-level and 8 function-level VFC datasets (Devign, BigVul, CrossVul, PatchDB, CleanVul, SecVulEval, ...)."
|
||||
|
||||
[[dataset]]
|
||||
name = "GitHub Advisory Database"
|
||||
url = "https://github.com/github/advisory-database"
|
||||
level = "advisory"
|
||||
languages = ["multi"]
|
||||
notes = "GHSA JSON with affected packages; pair with OSV/NVD for fix commits. Not code itself."
|
||||
|
||||
[[dataset]]
|
||||
name = "OSV"
|
||||
url = "https://github.com/google/osv.dev"
|
||||
level = "advisory"
|
||||
languages = ["multi"]
|
||||
notes = "Cross-ecosystem advisories with introduced/fixed commit ranges when present."
|
||||
|
||||
[[dataset]]
|
||||
name = "security-patches-dataset"
|
||||
url = "https://github.com/tqrg/security-patches-dataset"
|
||||
level = "commit"
|
||||
languages = ["multi"]
|
||||
notes = "Ground-truth security patches mined from NVD, CVE Details, OSV."
|
||||
@@ -0,0 +1,121 @@
|
||||
id,project_slug,cve_id,cwe_id,cwe_name,github_username,github_repository_name,github_tag,github_url,advisory_id,buggy_commit_id,fix_commit_ids
|
||||
1,DSpace__DSpace_CVE-2016-10726_4.4,CVE-2016-10726,CWE-022,Improper Limitation of a Pathname to a Restricted Directory ('Path Traversal'),DSpace,DSpace,4.4,https://github.com/DSpace/DSpace,GHSA-4m9r-5gqp-7j82,ca4c86b1baa4e0b07975b1da86a34a6e7170b3b7,4239abd2dd2ae0dedd7edc95a5c9f264fdcf639d
|
||||
2,perwendel__spark_CVE-2018-9159_2.7.1,CVE-2018-9159,CWE-022,Improper Limitation of a Pathname to a Restricted Directory ('Path Traversal'),perwendel,spark,2.7.1,https://github.com/perwendel/spark,GHSA-76qr-mmh8-cp8f,5316c0d0f057daaf556c3907c20df975f7bf8a8a,030e9d00125cbd1ad759668f85488aba1019c668;a221a864db28eb736d36041df2fa6eb8839fc5cd;ce9e11517eca69e58ed4378d1e47a02bd06863cc
|
||||
3,perwendel__spark_CVE-2016-9177_2.5.1,CVE-2016-9177,CWE-022,Improper Limitation of a Pathname to a Restricted Directory ('Path Traversal'),perwendel,spark,2.5.1,https://github.com/perwendel/spark,GHSA-89gc-6cw6-4vch,ce57dfb949ed183405f75dee8cf3262b45c9b3b5,efcb46c710e3f56805b9257a63d1306882f4faf9
|
||||
4,wildfly__wildfly_CVE-2018-1047_11.0.0.Final,CVE-2018-1047,CWE-022,Improper Limitation of a Pathname to a Restricted Directory ('Path Traversal'),wildfly,wildfly,11.0.0.Final,https://github.com/wildfly/wildfly,GHSA-fmr4-w67p-vh8x,4fd7bffaf2ee73201910684f2674aa1bced7fe81,735c77ce8b3bab6aa5072fb8575dc96db52d01ab;21c358acf0b06f38ec46034404c7a3d0bbbc132d;9ff55ed2da845a6f604b2edd1bc3bd311f1b776c
|
||||
5,vert-x3__vertx-web_CVE-2018-12542_3.5.3.CR1,CVE-2018-12542,CWE-022,Improper Limitation of a Pathname to a Restricted Directory ('Path Traversal'),vert-x3,vertx-web,3.5.3.CR1,https://github.com/vert-x3/vertx-web,GHSA-h39x-m55c-v55h,3fe3873cc28b4d833c90f8989ff797a7b463da2c,57a65dce6f4c5aa5e3ce7288685e7f3447eb8f3b
|
||||
6,apache__camel_CVE-2018-8041_2.20.3,CVE-2018-8041,CWE-022,Improper Limitation of a Pathname to a Restricted Directory ('Path Traversal'),apache,camel,2.20.3,https://github.com/apache/camel,GHSA-jv74-f9pj-xp3f,32bfda73ddd1ea8576bcb53dac496af9e0825f1a,4580e4d6c65cfd544c1791c824b5819477c583cc;4f401c09d22c45c94fa97746dc31905e06b19e3;63c7c080de4d18f9ceb25843508710df2c2c6d4;a0d25d9582c6ee85e9567fa39413df0b4f02ef7
|
||||
7,dromara__hutool_CVE-2018-17297_4.1.11,CVE-2018-17297,CWE-022,Improper Limitation of a Pathname to a Restricted Directory ('Path Traversal'),dromara,hutool,4.1.11,https://github.com/dromara/hutool,GHSA-rhq2-2574-78mc,7687720c5125b29386d3bb9c7c2931da79664b73,8d7d0b7fb5ea4f7447b40131bffc1ec506a6528e
|
||||
8,apache__tika_CVE-2018-11762_1.18,CVE-2018-11762,CWE-022,Improper Limitation of a Pathname to a Restricted Directory ('Path Traversal'),apache,tika,1.18,https://github.com/apache/tika,GHSA-w6g3-v46q-5p28,38ff2a986af24ee255f1f91d654ea402f4016696,a09d853dbed712f644e274b497cce254f3189d57;5c78eb78893fa077a4e58be4484eab4717667d52
|
||||
9,square__retrofit_CVE-2018-1000850_2.4.0,CVE-2018-1000850,CWE-022,Improper Limitation of a Pathname to a Restricted Directory ('Path Traversal'),square,retrofit,2.4.0,https://github.com/square/retrofit,GHSA-8p8g-f9vg-r7xr,7158698314daa138e993fac6a590ed19d78a8599,b9a7f6ad72073ddd40254c0058710e87a073047d
|
||||
10,apache__jspwiki_CVE-2019-0225_2.11.0.M2,CVE-2019-0225,CWE-022,Improper Limitation of a Pathname to a Restricted Directory ('Path Traversal'),apache,jspwiki,2.11.0.M2,https://github.com/apache/jspwiki,GHSA-pffw-p2q5-w6vh,d48bcef107a14dd07ecd830ab817b8df796082a4,88d89d6523802c044cfcb7930cba40d8eeb21da2
|
||||
11,apache__camel_CVE-2019-0194_2.21.4,CVE-2019-0194,CWE-022,Improper Limitation of a Pathname to a Restricted Directory ('Path Traversal'),apache,camel,2.21.4,https://github.com/apache/camel,GHSA-4wjq-69rc-8wcp,757bc836d1d9ed11d11de73c5dc72fc53617d6a0,5b64969d37cf2906efd4623cfd473041ce5132fd
|
||||
12,asf__tapestry-5_CVE-2019-0207_5.4.4,CVE-2019-0207,CWE-022,Improper Limitation of a Pathname to a Restricted Directory ('Path Traversal'),apache,tapestry-5,5.4.4,https://github.com/apache/tapestry-5,GHSA-89r3-rcpj-h7w6,d29cc6778eb0c75e45139274005bba1c4f58907f,6dd7219fd4707467a36091e2f7f5f6460c619099
|
||||
13,spring-cloud__spring-cloud-config_CVE-2020-5410_2.1.8.RELEASE,CVE-2020-5410,CWE-022,Improper Limitation of a Pathname to a Restricted Directory ('Path Traversal'),spring-cloud,spring-cloud-config,2.1.8.RELEASE,https://github.com/spring-cloud/spring-cloud-config,GHSA-32xf-jwmv-9hf3,91843a9ddc7489275b679568bfce1e4c37af71e1,03eaadc25323d8c8c89f528e8585033ed90c50f6
|
||||
14,spring-cloud__spring-cloud-config_CVE-2020-5405_2.1.6.RELEASE,CVE-2020-5405,CWE-022,Improper Limitation of a Pathname to a Restricted Directory ('Path Traversal'),spring-cloud,spring-cloud-config,2.1.6.RELEASE,https://github.com/spring-cloud/spring-cloud-config,GHSA-g86w-v5vg-9gxf,24e7292e5930367396461354d3f9d8ba8b94771c,651f458919c40ef9a5e93e7d76bf98575910fad0
|
||||
15,apache__rocketmq_CVE-2019-17572_4.6.0,CVE-2019-17572,CWE-022,Improper Limitation of a Pathname to a Restricted Directory ('Path Traversal'),apache,rocketmq,4.6.0,https://github.com/apache/rocketmq,GHSA-5x3v-2gxr-59m2,d1b4e47c26576cf4fa543bbdd8c6f09643220bed,f8f6fbe4aa7f5dee937e688322628c366b12a552
|
||||
16,joniles__mpxj_CVE-2020-35460_8.3.4,CVE-2020-35460,CWE-022,Improper Limitation of a Pathname to a Restricted Directory ('Path Traversal'),joniles,mpxj,8.3.4,https://github.com/joniles/mpxj,GHSA-p9j6-4pjr-gp48,87ea0ba33e901b87c95a18e3703ac51b59e2ee04,8eaf4225048ea5ba7e59ef4556dab2098fcc4a1d
|
||||
17,apache__flink_CVE-2020-17519_1.11.2,CVE-2020-17519,CWE-022,Improper Limitation of a Pathname to a Restricted Directory ('Path Traversal'),apache,flink,1.11.2,https://github.com/apache/flink,GHSA-395w-qhqr-9fr6,fe3613574f76201a8d55d572a639a4ce7e18a9db,b561010b0ee741543c3953306037f00d7a9f0801
|
||||
18,kubernetes-client__java_CVE-2020-8570_client-java-parent-9.0.1,CVE-2020-8570,CWE-022,Improper Limitation of a Pathname to a Restricted Directory ('Path Traversal'),kubernetes-client,java,client-java-parent-9.0.1,https://github.com/kubernetes-client/java,GHSA-cghx-9gcr-r42x,796c74f4244cacd90d99393640ccaad0c72f8893,858316ae8bc1145005a0310e1f65f95d2389a589
|
||||
19,asf__commons-io_CVE-2021-29425_2.6,CVE-2021-29425,CWE-022,Improper Limitation of a Pathname to a Restricted Directory ('Path Traversal'),apache,commons-io,2.6,https://github.com/apache/commons-io,GHSA-gwrp-pvrq-jmwv,2ae025fe5c4a7d2046c53072b0898e37a079fe62,fe7543eee5cd4b2f9e78aa44c31031b68eba204d
|
||||
20,asf__karaf_CVE-2022-22932_4.3.5,CVE-2022-22932,CWE-022,Improper Limitation of a Pathname to a Restricted Directory ('Path Traversal'),apache,karaf,4.3.5,https://github.com/apache/karaf,GHSA-544x-2jx9-4pfg,d0439e5b0dde1c7e3ff0207c557aa701093acd25,36a2bc4
|
||||
21,asf__james-project_CVE-2022-22931_3.6.0,CVE-2022-22931,CWE-022,Improper Limitation of a Pathname to a Restricted Directory ('Path Traversal'),apache,james-project,3.6.0,https://github.com/apache/james-project,GHSA-v84g-cf5j-xjqx,34f9b0b52ab8c84378d3a34ac43a0fef5aa4e8fe,8f9512637d374ccdf84d61617a2878557bf07532
|
||||
22,vert-x3__vertx-web_CVE-2019-17640_3.9.3,CVE-2019-17640,CWE-022,Improper Limitation of a Pathname to a Restricted Directory ('Path Traversal'),vert-x3,vertx-web,3.9.3,https://github.com/vert-x3/vertx-web,GHSA-vjw7-6gfq-6wf5,2146b7240096e25b40bb1acc083fa7ec79330989,b12f7c4c6576a8adc3f683b2899de4b0e7d099e4
|
||||
23,ESAPI__esapi-java-legacy_CVE-2022-23457_2.2.3.1,CVE-2022-23457,CWE-022,Improper Limitation of a Pathname to a Restricted Directory ('Path Traversal'),ESAPI,esapi-java-legacy,2.2.3.1,https://github.com/ESAPI/esapi-java-legacy,GHSA-8m5h-hrqm-pxm2,2e8694c6beb3bdbb2645b882eba72ce41bc63242,a0d67b75593878b1b6e39e2acc1773b3effedb2a
|
||||
24,xwiki__xwiki-commons_CVE-2022-24897_12.6.6,CVE-2022-24897,CWE-022,Improper Limitation of a Pathname to a Restricted Directory ('Path Traversal'),xwiki,xwiki-commons,12.6.6,https://github.com/xwiki/xwiki-commons,GHSA-cvx5-m8vg-vxgc,4f33e1efd74016fa9eb31b3c2fcd01bc6becd551,215951cfb0f808d0bf5b1097c9e7d1e503449ab8
|
||||
25,srikanth-lingala__zip4j_CVE-2018-1002202_1.3.2,CVE-2018-1002202,CWE-022,Improper Limitation of a Pathname to a Restricted Directory ('Path Traversal'),srikanth-lingala,zip4j,1.3.2,https://github.com/iris-sast/zip4j,GHSA-2rpm-4x8c-pvqg,d87ffa2d64ffb3a0a1cf0c7a69c7b19d7015bfde,59aeea594ff885e06c25751dc6334dfea1bed8c6
|
||||
26,alibaba__one-java-agent_CVE-2022-25842_0.0.1,CVE-2022-25842,CWE-022,Improper Limitation of a Pathname to a Restricted Directory ('Path Traversal'),alibaba,one-java-agent,0.0.1,https://github.com/alibaba/one-java-agent,GHSA-9hr3-j9mc-xmq2,b911af2bb779917c84a016350700745dc31c642a,359603b63fc6c59d8b57e061c171954bab3433bf;e0149bb36488fede2a12cb1ab3c2095e56dd7571
|
||||
27,apache__myfaces_CVE-2011-4367_2.0.11,CVE-2011-4367,CWE-022,Improper Limitation of a Pathname to a Restricted Directory ('Path Traversal'),apache,myfaces,2.0.11,https://github.com/apache/myfaces,GHSA-gjfx-9wx3-j6r7,bedac49daffc3cb792fa19884620af01ab5a01ab,236cd211327c557825c7fce091bcc68f57a88e8e;99ef1250ca3e28213e85eac14817e1ff93fc9e6a;c07c3bf93ad0e0cf530ddece0642783f1553ad89;9e7e996a4ef83c4d8e673ee6e4431348e598e031;b9b2e00bb53d3eb435256c5a140b83f7d6251b55
|
||||
28,undertow-io__undertow_CVE-2014-7816_1.0.16.Final,CVE-2014-7816,CWE-022,Improper Limitation of a Pathname to a Restricted Directory ('Path Traversal'),undertow-io,undertow,1.0.16.Final,https://github.com/undertow-io/undertow,GHSA-h6p6-fc4w-cqhx,4aa98c80fa9962235c94f8666c30793d0018f95d,28f244e63f558ba99a197813cfd5eee461b52b4c
|
||||
29,jeremylong__DependencyCheck_CVE-2018-12036_3.1.2,CVE-2018-12036,CWE-022,Improper Limitation of a Pathname to a Restricted Directory ('Path Traversal'),jeremylong,DependencyCheck,3.1.2,https://github.com/jeremylong/DependencyCheck,GHSA-hcwx-7q5v-vc67,c3b5b3c0d7fe7283b4cd421149d6fb620476f67d,c106ca919aa343b95cca0ffff0a0b5dc20b2baf7
|
||||
30,codehaus-plexus__plexus-archiver_CVE-2018-1002200_3.5,CVE-2018-1002200,CWE-022,Improper Limitation of a Pathname to a Restricted Directory ('Path Traversal'),codehaus-plexus,plexus-archiver,3.5,https://github.com/codehaus-plexus/plexus-archiver,GHSA-hcxq-x77q-3469,b9f9a425865eb47fb3665b3144ee4ca11f402704,f8f4233508193b70df33759ae9dc6154d69c2ea8
|
||||
31,zeroturnaround__zt-zip_CVE-2018-1002201_1.12,CVE-2018-1002201,CWE-022,Improper Limitation of a Pathname to a Restricted Directory ('Path Traversal'),zeroturnaround,zt-zip,1.12,https://github.com/zeroturnaround/zt-zip,GHSA-qcf3-9vmh-xw4r,bd3f3d77f3709f901fd5180a493ef32e4dfebfa6,759b72f33bc8f4d69f84f09fcb7f010ad45d6fff
|
||||
32,whitesource__curekit_CVE-2022-23082_1.1.3,CVE-2022-23082,CWE-022,Improper Limitation of a Pathname to a Restricted Directory ('Path Traversal'),whitesource,CureKit,1.1.3,https://github.com/whitesource/CureKit,GHSA-m9vj-44f3-78xw,7b275a67a5992165deb186b2b3f7764ddd062d26,af35e870ed09411d2f1fae6db1b04598cd1a31b6
|
||||
33,aws__aws-sdk-java_CVE-2022-31159_1.12.260,CVE-2022-31159,CWE-022,Improper Limitation of a Pathname to a Restricted Directory ('Path Traversal'),aws,aws-sdk-java,1.12.260,https://github.com/aws/aws-sdk-java,GHSA-c28r-hw5m-5gv3,5555d847a882d4c3094b00ac7cec21a16cf01a3e,cb66c50c885566d9a7fce837a68dc48ddced8a9a
|
||||
34,jlangch__venice_CVE-2022-36007_1.10.16,CVE-2022-36007,CWE-022,Improper Limitation of a Pathname to a Restricted Directory ('Path Traversal'),jlangch,venice,1.10.16,https://github.com/jlangch/venice,GHSA-4mmh-5vw7-rgvj,9306c93686100a6bc52ad0c8cb617ed199b5f75c,215ae91bb964013b0a2d70718a692832d561ae0a;c942c73136333bc493050910f171a48e6f575b23
|
||||
35,DSpace__DSpace_CVE-2022-31195_5.10,CVE-2022-31195,CWE-022,Improper Limitation of a Pathname to a Restricted Directory ('Path Traversal'),DSpace,DSpace,5.10,https://github.com/DSpace/DSpace,GHSA-8rmh-55h4-93h5,eca7968be7d6b9f8f5f302c9fc09f8186ed4809e,56e76049185bbd87c994128a9d77735ad7af0199;7af52a0883a9dbc475cf3001f04ed11b24c8a4c0
|
||||
36,payara__Payara_CVE-2022-37422_5.2022.2,CVE-2022-37422,CWE-022,Improper Limitation of a Pathname to a Restricted Directory ('Path Traversal'),payara,Payara,5.2022.2,https://github.com/payara/Payara,GHSA-h28c-453m-h9xm,7680990e55c04d628f16a591f950a2b3a4dcb401,6490d4918c65ba6df8344424cb9b8ab583d90b1a
|
||||
37,DSpace__DSpace_CVE-2022-31194_5.10,CVE-2022-31194,CWE-022,Improper Limitation of a Pathname to a Restricted Directory ('Path Traversal'),DSpace,DSpace,5.10,https://github.com/DSpace/DSpace,GHSA-qp5m-c3m9-8q2p,eca7968be7d6b9f8f5f302c9fc09f8186ed4809e,7569c6374aefeafb996e202cf8d631020eda5f24;d1dd7d23329ef055069759df15cfa200c8e3
|
||||
38,diffplug__goomph_CVE-2022-26049_3.37.1,CVE-2022-26049,CWE-022,Improper Limitation of a Pathname to a Restricted Directory ('Path Traversal'),diffplug,goomph,3.37.1,https://github.com/diffplug/goomph,GHSA-p2f7-9cv7-jjf6,fe2083196f0d0a75885aea402baaa972254173d5,25f04f67ba62d9a14104bee13a0a0f2517afb8c8
|
||||
39,apache__dolphinscheduler_CVE-2022-26884_2.0.5,CVE-2022-26884,CWE-022,Improper Limitation of a Pathname to a Restricted Directory ('Path Traversal'),apache,dolphinscheduler,2.0.5,https://github.com/apache/dolphinscheduler,GHSA-vpgf-fgm8-gxr2,f31328276c12821c21d1ce07e824bc74146c19b2,9717da6c255414eaef1c9ac943b0eb8989c1a85d
|
||||
40,apache__dolphinscheduler_CVE-2022-34662_2.0.9,CVE-2022-34662,CWE-022,Improper Limitation of a Pathname to a Restricted Directory ('Path Traversal'),apache,dolphinscheduler,2.0.9,https://github.com/apache/dolphinscheduler,GHSA-fp35-xrrr-3gph,23302054559410093573fb169336bafeb02db97f,63f835715f8ca8bff79c0e7177ebfa5917ebb3bd
|
||||
41,testng-team__testng_CVE-2022-4065_7.5,CVE-2022-4065,CWE-022,Improper Limitation of a Pathname to a Restricted Directory ('Path Traversal'),cbeust,testng,7.5,https://github.com/cbeust/testng,GHSA-rc2q-x9mf-w3vf,d8adcef70a9e0b8fcef5eab92ca87a8d398cfb89,9150736cd2c123a6a3b60e6193630859f9f0422b
|
||||
42,apache__uima-uimaj_CVE-2022-32287_3.3.0,CVE-2022-32287,CWE-022,Improper Limitation of a Pathname to a Restricted Directory ('Path Traversal'),apache,uima-uimaj,3.3.0,https://github.com/apache/uima-uimaj,GHSA-xgqr-5wqw-9fpv,f1f557a415ae38e383bf050587a510211515c21d,1088f615154b385dd163965b8d2ef78e87111ab1
|
||||
43,keycloak__keycloak_CVE-2022-3782_20.0.1,CVE-2022-3782,CWE-022,Improper Limitation of a Pathname to a Restricted Directory ('Path Traversal'),keycloak,keycloak,20.0.1,https://github.com/keycloak/keycloak,GHSA-g8q8-fggx-9r3q,cce8ee2b1ab7c925bfbb62d8f12a33e93d943040,da8d61616399d5c4e4c470c16dd6b0bd98f2b656
|
||||
44,eclipse-ee4j__glassfish_CVE-2022-2712_6.2.5,CVE-2022-2712,CWE-022,Improper Limitation of a Pathname to a Restricted Directory ('Path Traversal'),eclipse-ee4j,glassfish,6.2.5,https://github.com/eclipse-ee4j/glassfish,GHSA-3g5w-6pw7-6hrp,0159b68b362c7f4be78d1fa75aeaf2ec0b997f1d,6982a7ca7e7fb9f02276dc12ab61832daf4002bd
|
||||
45,hapifhir__org.hl7.fhir.core_CVE-2023-24057_5.6.91,CVE-2023-24057,CWE-022,Improper Limitation of a Pathname to a Restricted Directory ('Path Traversal'),hapifhir,org.hl7.fhir.core,5.6.91,https://github.com/hapifhir/org.hl7.fhir.core,GHSA-jqh6-9574-5x22,7b22d0355b1b12448e50b9cbfe2a8ae63f2ee828,b50aec59124416b7315a49220cfc3999223414cc
|
||||
46,hapifhir__org.hl7.fhir.core_CVE-2023-28465_5.6.105,CVE-2023-28465,CWE-022,Improper Limitation of a Pathname to a Restricted Directory ('Path Traversal'),hapifhir,org.hl7.fhir.core,5.6.105,https://github.com/hapifhir/org.hl7.fhir.core,GHSA-9654-pr4f-gh6m,0b8e2c39841b51def04e29d3b745602517602d5b,909f7e64fea6532a00b3eb8904bf620fc3cae6d1
|
||||
47,Graylog2__graylog2-server_CVE-2023-41044_5.1.2,CVE-2023-41044,CWE-022,Improper Limitation of a Pathname to a Restricted Directory ('Path Traversal'),Graylog2,graylog2-server,5.1.2,https://github.com/Graylog2/graylog2-server,GHSA-2q4p-f6gf-mqr5,d970230b6f3ecb83e07dd43df56428d1421c40e9,02b8792e6f4b829f0c1d87fcbf2d58b73458b938
|
||||
48,apache__mina-sshd_CVE-2023-35887_2.9.2,CVE-2023-35887,CWE-022,Improper Limitation of a Pathname to a Restricted Directory ('Path Traversal'),apache,mina-sshd,2.9.2,https://github.com/apache/mina-sshd,GHSA-mjmq-gwgm-5qhm,fbbbb7b6af7fdf1765f297a96dfec3f198f5fd7d,10de190e7d3f9189deb76b8d08c72334a1fe2df0;a61e93035f06bff8fc622ad94870fb773d48b9f0;c20739b43aab0f7bf2ccad982a6cb37b9d5a8a0b
|
||||
49,apache__shiro_CVE-2023-34478_1.11.0,CVE-2023-34478,CWE-022,Improper Limitation of a Pathname to a Restricted Directory ('Path Traversal'),apache,shiro,1.11.0,https://github.com/apache/shiro,GHSA-pmhc-2g4f-85cg,adb56c885210eeca710b2df17f6b3aeda85e4f35,c3ede3f94efb442acb0795714a022c2c121d1da0
|
||||
50,codehaus-plexus__plexus-archiver_CVE-2023-37460_4.7.1,CVE-2023-37460,CWE-022,Improper Limitation of a Pathname to a Restricted Directory ('Path Traversal'),codehaus-plexus,plexus-archiver,4.7.1,https://github.com/codehaus-plexus/plexus-archiver,GHSA-wh3p-fphp-9h2m,e7cbadba1b5c78192677da95b355dd790f3a4535,54759839fbdf85caf8442076f001d5fd64e0dcb2
|
||||
51,codehaus-plexus__plexus-utils_CVE-2022-4244_3.0.23,CVE-2022-4244,CWE-022,Improper Limitation of a Pathname to a Restricted Directory ('Path Traversal'),codehaus-plexus,plexus-utils,3.0.23,https://github.com/codehaus-plexus/plexus-utils,GHSA-g6ph-x5wf-g337,6176f91bb843eecddac857591ed20bda38e01470,33a2853df8185b4519b1b8bfae284f03392618ef
|
||||
52,yamcs__yamcs_CVE-2023-45278_5.8.6,CVE-2023-45278,CWE-022,Improper Limitation of a Pathname to a Restricted Directory ('Path Traversal'),yamcs,yamcs,5.8.6,https://github.com/yamcs/yamcs,GHSA-43fw-536j-w37j,9443a67d2aeda20fb73f68c5d571b515d68c05e4,b6db35e432e62fdff0447cf513369f0b8a848abf
|
||||
53,yamcs__yamcs_CVE-2023-45277_5.8.6,CVE-2023-45277,CWE-022,Improper Limitation of a Pathname to a Restricted Directory ('Path Traversal'),yamcs,yamcs,5.8.6,https://github.com/yamcs/yamcs,GHSA-w4m2-qmh3-2g8f,9443a67d2aeda20fb73f68c5d571b515d68c05e4,b6db35e432e62fdff0447cf513369f0b8a848abf
|
||||
54,apache__shiro_CVE-2023-46749_1.12.0,CVE-2023-46749,CWE-022,Improper Limitation of a Pathname to a Restricted Directory ('Path Traversal'),apache,shiro,1.12.0,https://github.com/apache/shiro,GHSA-jc7h-c423-mpjc,c8a294ab32b29a6e9d4b03bbaa6bae11c42daea1,8400d08d5eac0bc4fae99d28c5adc82dd8a86eda
|
||||
55,apache__sling-org-apache-sling-servlets-resolver_CVE-2024-23673_2.10.0,CVE-2024-23673,CWE-022,Improper Limitation of a Pathname to a Restricted Directory ('Path Traversal'),apache,sling-org-apache-sling-servlets-resolver,2.10.0,https://github.com/apache/sling-org-apache-sling-servlets-resolver,GHSA-h2rq-qhr7-53gm,cb80c5e80144fcd9f6ac283ffb564f3b863cfbb2,b54d4e6693e0bcd63a97a0328f4f065b8a81b75e
|
||||
56,x-stream__xstream_CVE-2013-7285_1.4.6,CVE-2013-7285,CWE-078,Improper Neutralization of Special Elements used in an OS Command ('OS Command Injection'),x-stream,xstream,1.4.6,https://github.com/x-stream/xstream,GHSA-f554-x222-wgf7,768c6e417a75e7732fc591bee844e5e81af56a7d,6344867dce6767af7d0fe34fb393271a6456672d
|
||||
57,x-stream__xstream_CVE-2020-26217_1.4.14-java7,CVE-2020-26217,CWE-078,Improper Neutralization of Special Elements used in an OS Command ('OS Command Injection'),x-stream,xstream,1.4.14-java7,https://github.com/x-stream/xstream,GHSA-mw36-7c6c-q4q2,d03f6987b793fac71ab89a31d7aa633c366c5289,0fec095d534126931c99fd38e9c6d41f5c685c1a
|
||||
58,x-stream__xstream_CVE-2021-21345_1.4.15,CVE-2021-21345,CWE-078,Improper Neutralization of Special Elements used in an OS Command ('OS Command Injection'),x-stream,xstream,1.4.15,https://github.com/x-stream/xstream,GHSA-hwpc-8xqv-jvj4,f04bbec461f2c2a6f1e2cf41770f42c64aae24a4,d5e51177634afea7213b9dc2d21f101d2e258db9
|
||||
59,jenkinsci__docker-commons-plugin_CVE-2022-20617_1.17,CVE-2022-20617,CWE-078,Improper Neutralization of Special Elements used in an OS Command ('OS Command Injection'),jenkinsci,docker-commons-plugin,1.17,https://github.com/jenkinsci/docker-commons-plugin,GHSA-jpxj-vgq5-prjc,2f0fda49452a7653c33de24220c908786f1aa405,c069b79c31c5aa80a01b0c462f0dc6b41751f059
|
||||
60,jenkinsci__workflow-cps-plugin_CVE-2022-25173_2646.v6ed3b5b01ff1,CVE-2022-25173,CWE-078,Improper Neutralization of Special Elements used in an OS Command ('OS Command Injection'),jenkinsci,workflow-cps-plugin,2646.v6ed3b5b01ff1,https://github.com/jenkinsci/workflow-cps-plugin,GHSA-4m7p-55jm-3vwv,6ed3b5b01ff16dc4f6f9f4b209dbc21394b13913,f7ae7b75a457976853539bff1db52373b85fdb85
|
||||
61,jenkinsci__workflow-cps-global-lib-plugin_CVE-2022-25174_544.vff04fa68714d,CVE-2022-25174,CWE-078,Improper Neutralization of Special Elements used in an OS Command ('OS Command Injection'),jenkinsci,workflow-cps-global-lib-plugin,544.vff04fa68714d,https://github.com/jenkinsci/workflow-cps-global-lib-plugin,GHSA-g9fx-6j5c-grmw,ff04fa68714d2cc277e8a87512461bdf3a39e186,ace0de3c2d691662021ea10306eeb407da6b6365
|
||||
62,jenkinsci__workflow-multibranch-plugin_CVE-2022-25175_706.vd43c65dec013,CVE-2022-25175,CWE-078,Improper Neutralization of Special Elements used in an OS Command ('OS Command Injection'),jenkinsci,workflow-multibranch-plugin,706.vd43c65dec013,https://github.com/jenkinsci/workflow-multibranch-plugin,GHSA-pj84-qjm3-77mg,d43c65dec013812b084fecbb4a310d856eb6b89a,71c3f0a6ccdb2ba43f43686826b0d62160df85e8
|
||||
63,apache__activemq_CVE-2014-3576_5.10.1,CVE-2014-3576,CWE-078,Improper Neutralization of Special Elements used in an OS Command ('OS Command Injection'),apache,activemq,5.10.1,https://github.com/apache/activemq,GHSA-3wfj-vh84-732p,8938d14d434447193b02ba635606aa0fb7a80353,f07e6a53216f9388185ac2b39f366f3bfd6a8a55
|
||||
64,codehaus-plexus__plexus-utils_CVE-2017-1000487_3.0.15,CVE-2017-1000487,CWE-078,Improper Neutralization of Special Elements used in an OS Command ('OS Command Injection'),codehaus-plexus,plexus-utils,3.0.15,https://github.com/codehaus-plexus/plexus-utils,GHSA-8vhq-qq4p-grq3,3b271b43f9e5021b4232fc2ffdfb4e469c7f8685,b38a1b3a4352303e4312b2bb601a0d7ec6e28f41
|
||||
65,jenkinsci__git-client-plugin_CVE-2019-10392_2.8.4,CVE-2019-10392,CWE-078,Improper Neutralization of Special Elements used in an OS Command ('OS Command Injection'),jenkinsci,git-client-plugin,2.8.4,https://github.com/jenkinsci/git-client-plugin,GHSA-hw6x-2qwv-rxr7,72add81da4cbeabc95504ebdb9007d47ac1c2b0b,899123fa2eb9dd2c37137aae630c47c6be6b4b02
|
||||
66,jenkinsci__perfecto-plugin_CVE-2020-2261_1.17,CVE-2020-2261,CWE-078,Improper Neutralization of Special Elements used in an OS Command ('OS Command Injection'),jenkinsci,perfecto-plugin,1.17,https://github.com/jenkinsci/perfecto-plugin,GHSA-jq84-6fmm-6qv6,adabcd9da98628e063bb91198e30ff39a34dc921,52c09ad2e26416211e4009b095c4f16508b27b8a
|
||||
67,apache__nifi_CVE-2022-33140_1.16.2,CVE-2022-33140,CWE-078,Improper Neutralization of Special Elements used in an OS Command ('OS Command Injection'),apache,nifi,1.16.2,https://github.com/apache/nifi,GHSA-77hf-23pq-2g7c,06f04958272dafc30ce357c4c4edcaf470050b52,a1306a19f78e11c2d809e9aef24336669461403a
|
||||
68,jenkinsci__script-security-plugin_CVE-2023-24422_1228.vd93135a_2fb_25,CVE-2023-24422,CWE-078,Improper Neutralization of Special Elements used in an OS Command ('OS Command Injection'),jenkinsci,script-security-plugin,1228.vd93135a_2fb_25,https://github.com/jenkinsci/script-security-plugin,GHSA-76qj-9gwh-pvv3,d93135a2fb250c04cc361b0bb1efd809bc63ad08,4880bbe905a6783d80150c8b881d0127430d4a73
|
||||
69,nahsra__antisamy_CVE-2016-10006_1.5.3,CVE-2016-10006,CWE-079,Improper Neutralization of Input During Web Page Generation ('Cross-site Scripting'),nahsra,antisamy,1.5.3,https://github.com/nahsra/antisamy,GHSA-683w-6h9j-57wq,8bebe1eb2ec1ac23e34111e9d06024d7dab7fa25,90550e42b39972fce0db4bcab0e1ce4359b94661;7313931dc3c0d1377b010f07faef2063dd359a36;5f4982e95f1894669550bb3f6a639573dd4e3756;5a783b4116a21a12ab10f57cd1c88616902af633
|
||||
70,nahsra__antisamy_CVE-2017-14735_1.5.6,CVE-2017-14735,CWE-079,Improper Neutralization of Input During Web Page Generation ('Cross-site Scripting'),nahsra,antisamy,1.5.6,https://github.com/nahsra/antisamy,GHSA-q44v-xc3g-v7jq,1369d4c904e1f021d3616580daf9e1d8e43e0ddb,82da009e733a989a57190cd6aa1b6824724f6d36
|
||||
71,apache__jspwiki_CVE-2019-10077_2.11.0.M3,CVE-2019-10077,CWE-079,Improper Neutralization of Input During Web Page Generation ('Cross-site Scripting'),apache,jspwiki,2.11.0.M3,https://github.com/apache/jspwiki,GHSA-cj6j-32rg-45r2,2ea7973c1c7fdf2771a9743dbc8ecb27c9bb162d,87c89f0405d6b31fc165358ce5d5bc4536e32a8a
|
||||
72,apache__jspwiki_CVE-2019-10076_2.11.0.M3,CVE-2019-10076,CWE-079,Improper Neutralization of Input During Web Page Generation ('Cross-site Scripting'),apache,jspwiki,2.11.0.M3,https://github.com/apache/jspwiki,GHSA-cxx2-fp39-rf3r,2ea7973c1c7fdf2771a9743dbc8ecb27c9bb162d,60a9cb84ce36a0392fa5a01afcf28c11857c2f9e
|
||||
73,apache__jspwiki_CVE-2019-10078_2.11.0.M3,CVE-2019-10078,CWE-079,Improper Neutralization of Input During Web Page Generation ('Cross-site Scripting'),apache,jspwiki,2.11.0.M3,https://github.com/apache/jspwiki,GHSA-hp5r-mhgp-56c9,2ea7973c1c7fdf2771a9743dbc8ecb27c9bb162d,46cd981dfb431730da3f9249f5db858aacf11e52
|
||||
74,apache__jspwiki_CVE-2019-10089_2.11.0.M4,CVE-2019-10089,CWE-079,Improper Neutralization of Input During Web Page Generation ('Cross-site Scripting'),apache,jspwiki,2.11.0.M4,https://github.com/apache/jspwiki,GHSA-3rx2-x6mx-grj3,6e1dc66adf3faa22e7f1f60189611a3d8ddb0726,2956ccb307dd4b23b25c8ddeae8d7e7b301c6ff3
|
||||
75,hibernate__hibernate-validator_CVE-2019-10219_6.0.17.Final,CVE-2019-10219,CWE-079,Improper Neutralization of Input During Web Page Generation ('Cross-site Scripting'),hibernate,hibernate-validator,6.0.17.Final,https://github.com/hibernate/hibernate-validator,GHSA-m8p2-495h-ccmh,7694cff9ed6325006382390c9bb2d8e4f3efedb6,124b7dd6d9a4ad24d4d49f74701f05a13e56ceee;20d729548511ac5cff6fd459f93de137195420fe
|
||||
76,asf__cxf_CVE-2019-17573_3.2.11,CVE-2019-17573,CWE-079,Improper Neutralization of Input During Web Page Generation ('Cross-site Scripting'),apache,cxf,3.2.11,https://github.com/apache/cxf,GHSA-f93p-f762-vr53,da2d27d97f9e9abd7d307e2224e5e0338b767ee2,a02e96ba1095596bef481919f16a90c5e80a92c8
|
||||
77,xuxueli__xxl-job_CVE-2020-29204_2.2.0,CVE-2020-29204,CWE-079,Improper Neutralization of Input During Web Page Generation ('Cross-site Scripting'),xuxueli,xxl-job,2.2.0,https://github.com/xuxueli/xxl-job,GHSA-wc73-w5r9-x9pc,1874c4854f81d6af4a9471d3fe111cdbf713f336,227628567354d3c156951009d683c6fec3006e0e
|
||||
78,OWASP__json-sanitizer_CVE-2020-13973_1.2.0,CVE-2020-13973,CWE-079,Improper Neutralization of Input During Web Page Generation ('Cross-site Scripting'),OWASP,json-sanitizer,1.2.0,https://github.com/OWASP/json-sanitizer,GHSA-g8jj-899q-8x3j,bb41f80ad575cb90ea6535976d7c17accb4b4c87,f3512bab078af3f5c533dacc2d410add8c0c1124
|
||||
79,eclipse__hawkbit_CVE-2020-27219_0.3.0M6,CVE-2020-27219,CWE-079,Improper Neutralization of Input During Web Page Generation ('Cross-site Scripting'),eclipse,hawkbit,0.3.0M6,https://github.com/eclipse/hawkbit,GHSA-rcvx-rmvf-mxch,f3659f01425ad0162f92fa73357f8c507058bcb2,94b7c12cde1b38eda5414bd88d6d068008cfb9f9
|
||||
80,alibaba__nacos_CVE-2021-44667_2.0.3,CVE-2021-44667,CWE-079,Improper Neutralization of Input During Web Page Generation ('Cross-site Scripting'),alibaba,nacos,2.0.3,https://github.com/alibaba/nacos,GHSA-4gr7-qw2q-jxh6,5a4d433970be9b8402f57e65bffa497027f21e30,cd6d7e33b94f24814701f3faf8b632e5e85444c5
|
||||
81,nahsra__antisamy_CVE-2022-28367_1.6.5,CVE-2022-28367,CWE-079,Improper Neutralization of Input During Web Page Generation ('Cross-site Scripting'),nahsra,antisamy,1.6.5,https://github.com/nahsra/antisamy,GHSA-3pqg-4rqg-pg9g,b7c151112dd19928e700ee48639942fd1079d1e3,0199e7e194dba5e7d7197703f43ebe22401e61ae
|
||||
82,ESAPI__esapi-java-legacy_CVE-2022-24891_2.2.3.1,CVE-2022-24891,CWE-079,Improper Neutralization of Input During Web Page Generation ('Cross-site Scripting'),ESAPI,esapi-java-legacy,2.2.3.1,https://github.com/ESAPI/esapi-java-legacy,GHSA-q77q-vx4q-xx6q,2e8694c6beb3bdbb2645b882eba72ce41bc63242,096aa60d6441fce4c632b36b36fdf5f53799c29a
|
||||
83,nahsra__antisamy_CVE-2022-29577_1.6.6.1,CVE-2022-29577,CWE-079,Improper Neutralization of Input During Web Page Generation ('Cross-site Scripting'),nahsra,antisamy,1.6.6.1,https://github.com/nahsra/antisamy,GHSA-vp37-2f9p-3vr3,b6e76de85a07549f2c97941437dd73430d7287a8,32e273507da0e964b58c50fd8a4c94c9d9363af0
|
||||
84,rhuss__jolokia_CVE-2018-1000129_1.4.0,CVE-2018-1000129,CWE-079,Improper Neutralization of Input During Web Page Generation ('Cross-site Scripting'),rhuss,jolokia,1.4.0,https://github.com/rhuss/jolokia,GHSA-hfpg-gqjw-779m,10727cab59a8fc2ae053bec6b2f26f48f1c4245c,5895d5c137c335e6b473e9dcb9baf748851bbc5f
|
||||
85,keycloak__keycloak_CVE-2014-3656_1.0.5.Final,CVE-2014-3656,CWE-079,Improper Neutralization of Input During Web Page Generation ('Cross-site Scripting'),keycloak,keycloak,1.0.5.Final,https://github.com/keycloak/keycloak,GHSA-px42-mr8m-cpgh,3b071b83aa0444749eba851fdbe0f2ed47932410,63b41e2548cbc20bd3758e34a82d880e177bf24c
|
||||
86,asf__cxf_CVE-2016-6812_3.0.11,CVE-2016-6812,CWE-079,Improper Neutralization of Input During Web Page Generation ('Cross-site Scripting'),apache,cxf,3.0.11,https://github.com/apache/cxf,GHSA-vw2c-5wph-v92r,6c7df35913ce3fc6ec8f5dc6c6074b187f751aa6,1be97cb13aef121b799b1be4d9793c0e8b925a12;1f824d8039c7a42a4aa46f844e6c800e1143c7e7;32e89366e2daa5670ac7a5c5c19f0bf9329a4c1e;a30397b0
|
||||
87,apache__sling-org-apache-sling-xss_CVE-2016-5394_1.0.8,CVE-2016-5394,CWE-079,Improper Neutralization of Input During Web Page Generation ('Cross-site Scripting'),apache,sling-org-apache-sling-xss,1.0.8,https://github.com/apache/sling-org-apache-sling-xss,GHSA-xwf4-88xr-hx2j,e23ca68878dd6504066015601b6b76e8fe19b752,de32b144ad2be3367559f6184d560db42a220529
|
||||
88,DSpace__DSpace_CVE-2022-31192_5.10,CVE-2022-31192,CWE-079,Improper Neutralization of Input During Web Page Generation ('Cross-site Scripting'),DSpace,DSpace,5.10,https://github.com/DSpace/DSpace,GHSA-4wm8-c2vv-xrpq,eca7968be7d6b9f8f5f302c9fc09f8186ed4809e,28eb8158210d41168a62ed5f9e044f754513bc37;f7758457b7ec3489d525e39aa753cc70809d9ad9
|
||||
89,keycloak__keycloak_CVE-2022-4137_20.0.3,CVE-2022-4137,CWE-079,Improper Neutralization of Input During Web Page Generation ('Cross-site Scripting'),keycloak,keycloak,20.0.3,https://github.com/keycloak/keycloak,GHSA-9hhc-pj4w-w5rv,02d113ab71de67817890b655ae792580a4fb8ee2,30d0e9d22dae51392e5a3748a1c68c116667359a
|
||||
90,keycloak__keycloak_CVE-2022-1274_20.0.3,CVE-2022-1274,CWE-079,Improper Neutralization of Input During Web Page Generation ('Cross-site Scripting'),keycloak,keycloak,20.0.3,https://github.com/keycloak/keycloak,GHSA-m4fv-gm5m-4725,02d113ab71de67817890b655ae792580a4fb8ee2,fc3c61235fa30132123c17ed8702ff7b3a672fe9
|
||||
91,xwiki__xwiki-commons_CVE-2023-29201_14.5,CVE-2023-29201,CWE-079,Improper Neutralization of Input During Web Page Generation ('Cross-site Scripting'),xwiki,xwiki-commons,14.5,https://github.com/xwiki/xwiki-commons,GHSA-m3jr-cvhj-f35j,3780c8f6836c7d380f649562e9718a0868112945,4a185e0594d90cd4916d60aa60bb4333dc5623b2;b11eae9d82cb53f32962056b5faa73f3720c6182
|
||||
92,xwiki__xwiki-commons_CVE-2023-29528_14.9-rc-1,CVE-2023-29528,CWE-079,Improper Neutralization of Input During Web Page Generation ('Cross-site Scripting'),xwiki,xwiki-commons,14.9-rc-1,https://github.com/xwiki/xwiki-commons,GHSA-x37v-36wv-6v6h,7796f76096a3e94b7a0a96bf12b3b026922e3573,8ff1a9d7e5d7b45b690134a537d53dc05cae04ab
|
||||
93,xwiki__xwiki-rendering_CVE-2023-32070_14.5,CVE-2023-32070,CWE-079,Improper Neutralization of Input During Web Page Generation ('Cross-site Scripting'),xwiki,xwiki-rendering,14.5,https://github.com/xwiki/xwiki-rendering,GHSA-6gf5-c898-7rxp,0057b2db748674446ceeacf3a540d42b7295a524,c40e2f5f9482ec6c3e71dbf1fff5ba8a5e44cdc1
|
||||
94,xwiki__xwiki-commons_CVE-2023-31126_14.10.3,CVE-2023-31126,CWE-079,Improper Neutralization of Input During Web Page Generation ('Cross-site Scripting'),xwiki,xwiki-commons,14.10.3,https://github.com/xwiki/xwiki-commons,GHSA-pv7v-ph6g-3gxv,011dee864805aec0b24151f69f230a42e40087da,0b8e9c45b7e7457043938f35265b2aa5adc76a68
|
||||
95,apache__jspwiki_CVE-2022-46907_2.11.3,CVE-2022-46907,CWE-079,Improper Neutralization of Input During Web Page Generation ('Cross-site Scripting'),apache,jspwiki,2.11.3,https://github.com/apache/jspwiki,GHSA-qvq8-cw7f-m7m4,515dff39c66c43318056fa76a20117662d2a0e8d,0b9a0149032170063f22d65e335dfd317db815ea;46e1ef7a595ca5cabf5ef184139910413f2024fc;484c6a133e397693991b7c9a9b62ef3ca48ce707;75019d337f1d0033b1f65428e75f43baeffd99dd;82be08904a6d8bd22fa2d4e5a7e85f43408724d3;9d6dbf911d52d724297e4e46c4b80649fb028ff9;df20770f251a8d7431047e556b144ef24ee6a3a7
|
||||
96,keycloak__keycloak_CVE-2022-4361_21.1.1,CVE-2022-4361,CWE-079,Improper Neutralization of Input During Web Page Generation ('Cross-site Scripting'),keycloak,keycloak,21.1.1,https://github.com/keycloak/keycloak,GHSA-3p62-6fjh-3p5h,0ca0a5fa4459d97c4d769fec15b4ba99c3824314,a1cfe6e24e5b34792699a00b8b4a8016a5929e3a
|
||||
97,xwiki__xwiki-commons_CVE-2023-36471_14.10.5,CVE-2023-36471,CWE-079,Improper Neutralization of Input During Web Page Generation ('Cross-site Scripting'),xwiki,xwiki-commons,14.10.5,https://github.com/xwiki/xwiki-commons,GHSA-6pqf-c99p-758v,8dfb9fcb4f456c70f82ea670ca0e2f3dee373ee4,99484d48e899a68a1b6e33d457825b776c6fe8c3
|
||||
98,jstachio__jstachio_CVE-2023-33962_1.0.0,CVE-2023-33962,CWE-079,Improper Neutralization of Input During Web Page Generation ('Cross-site Scripting'),jstachio,jstachio,1.0.0,https://github.com/jstachio/jstachio,GHSA-gwxv-jv83-6qjr,9ce20009d6bf726086fc528fceb174933077bff4,7b2f78377d1284df14c580be762a25af5f8dcd66
|
||||
99,xwiki__xwiki-rendering_CVE-2023-37908_14.10.3,CVE-2023-37908,CWE-079,Improper Neutralization of Input During Web Page Generation ('Cross-site Scripting'),xwiki,xwiki-rendering,14.10.3,https://github.com/xwiki/xwiki-rendering,GHSA-663w-2xp3-5739,0b0286c4caeab4cc1fdd617ec5bf0a91e6f46762,f4d5acac451dccaf276e69f0b49b72221eef5d2f
|
||||
100,SpringSource__spring-security-oauth_CVE-2018-1260_2.3.2.RELEASE,CVE-2018-1260,CWE-094,Improper Control of Generation of Code ('Code Injection'),spring-attic,spring-security-oauth,2.3.2.RELEASE,https://github.com/spring-attic/spring-security-oauth,GHSA-rrpm-pj7p-7j9q,97e39dde7e88aae802be98de084a382886ca4255,70e5ba84ca98b7ab42c1900bdd9fa51b393d611f
|
||||
101,apache__activemq_CVE-2019-0222_5.15.8,CVE-2019-0222,CWE-094,Improper Control of Generation of Code ('Code Injection'),apache,activemq,5.15.8,https://github.com/apache/activemq,GHSA-jpv3-g4cc-6vfx,bcad7e1f6a6dd078d87787a03b56560e995ef773,98b9f2e;f78c0962ffb46fae3397eed6b7ec1e6e15045031
|
||||
102,jmrozanec__cron-utils_CVE-2021-41269_9.1.5,CVE-2021-41269,CWE-094,Improper Control of Generation of Code ('Code Injection'),jmrozanec,cron-utils,9.1.5,https://github.com/jmrozanec/cron-utils,GHSA-p9m8-27x8-rg87,34493c66edb490396202edad66c5f8cc5717d494,cfd2880f80e62ea74b92fa83474c2aabdb9899da;d6707503ec2f20947f79e38f861dba93b39df9da
|
||||
103,apache__struts_CVE-2020-17530_2.5.25,CVE-2020-17530,CWE-094,Improper Control of Generation of Code ('Code Injection'),apache,struts,2.5.25,https://github.com/apache/struts,GHSA-jc35-q369-45pv,b3a9d82d5830ef9cd7811cfa3f86a373ae52fada,45667346629455f7ea125bff36bf9b763b7e8463
|
||||
104,apache__activemq_CVE-2020-11998_5.15.12,CVE-2020-11998,CWE-094,Improper Control of Generation of Code ('Code Injection'),apache,activemq,5.15.12,https://github.com/apache/activemq,GHSA-wqfh-9m4g-7x6x,cebbd7fdea0633e6a0cbbef427f9b753949fa531,0d6e5f2;88b78d0;aa8900c
|
||||
105,spring-projects__spring-framework_CVE-2022-22965_5.2.19.RELEASE,CVE-2022-22965,CWE-094,Improper Control of Generation of Code ('Code Injection'),spring-projects,spring-framework,5.2.19.RELEASE,https://github.com/spring-projects/spring-framework,GHSA-36p3-wjmg-h94x,925b07826067d57a8a057837a1b5973cb6fad186,002546b3e4b8d791ea6acccb81eb3168f51abb15
|
||||
106,spring-cloud__spring-cloud-gateway_CVE-2022-22947_3.0.6,CVE-2022-22947,CWE-094,Improper Control of Generation of Code ('Code Injection'),spring-cloud,spring-cloud-gateway,3.0.6,https://github.com/spring-cloud/spring-cloud-gateway,GHSA-3gx9-37ww-9qw6,da0f9014bcc9131d8f15141be74011b89a01420f,1b868d2159e8fb71c22d583e424ae699f90532e3
|
||||
107,apache__dubbo_CVE-2021-30180_2.7.9,CVE-2021-30180,CWE-094,Improper Control of Generation of Code ('Code Injection'),apache,dubbo,2.7.9,https://github.com/apache/dubbo,GHSA-7wfc-x4f7-gg2x,f0483b80a32e813a4393879744e30d0084c3eafd,041f8bb0a98a912bd363560d5a2339198dcf79a5
|
||||
108,apache__incubator-dubbo_CVE-2021-30181_2.6.8,CVE-2021-30181,CWE-094,Improper Control of Generation of Code ('Code Injection'),apache,dubbo,2.6.8,https://github.com/apache/dubbo,GHSA-qmfc-6www-fjqw,5a6a069986f3627f2d50720c50024df31a3dc38a,9b7575aa1c949959c86d29c47625575b58a9dfa9
|
||||
109,spring-projects__spring-security_CVE-2011-2732_2.0.6.RELEASE,CVE-2011-2732,CWE-094,Improper Control of Generation of Code ('Code Injection'),spring-projects,spring-security,2.0.6.RELEASE,https://github.com/spring-projects/spring-security,GHSA-5xm9-rf63-wj7h,beb0ec4ba95265a7e3481b3eb8d87f3b922733ae,a087e828a63edf0932e4eecf174cf816cbe6a58a;5238ba0e2615ef733a906b264c6c06a4446a886b
|
||||
110,fabric8io__kubernetes-client_CVE-2021-4178_5.0.2,CVE-2021-4178,CWE-094,Improper Control of Generation of Code ('Code Injection'),fabric8io,kubernetes-client,5.0.2,https://github.com/fabric8io/kubernetes-client,GHSA-98g7-rxmf-rrxm,1d1b3d404836871c4d0fc0a35dafe5d40369b519,445103004d1ed3153d5abb272473451d05891e39
|
||||
111,asf__commons-text_CVE-2022-42889_1.9,CVE-2022-42889,CWE-094,Improper Control of Generation of Code ('Code Injection'),apache,commons-text,1.9,https://github.com/apache/commons-text,GHSA-599f-7c49-w659,cb85bed468e99d34b88d0c81fe20eb3b1615660e,b9b40b903e2d1f9935039803c9852439576780ea
|
||||
112,ff4j__ff4j_CVE-2022-44262_1.8.13,CVE-2022-44262,CWE-094,Improper Control of Generation of Code ('Code Injection'),ff4j,ff4j,1.8.13,https://github.com/ff4j/ff4j,GHSA-65hj-9ppw-77xc,7c34409d320ed1c917c4ec4ac72a99661c4e446f,62d03140f3bfbd380d0f4b4e5a94dcb8baa9d9c6
|
||||
113,codecentric__spring-boot-admin_CVE-2022-46166_2.6.9,CVE-2022-46166,CWE-094,Improper Control of Generation of Code ('Code Injection'),codecentric,spring-boot-admin,2.6.9,https://github.com/codecentric/spring-boot-admin,GHSA-w3x5-427h-wfq6,650db9e89d80f54b41ebd18f8c27389e8741516d,c14c3ec12533f71f84de9ce3ce5ceb7991975f75
|
||||
114,xerial__sqlite-jdbc_CVE-2023-32697_3.41.2.1,CVE-2023-32697,CWE-094,Improper Control of Generation of Code ('Code Injection'),xerial,sqlite-jdbc,3.41.2.1,https://github.com/xerial/sqlite-jdbc,GHSA-6phf-6h5g-97j2,a3322b2ae802b28624bcd4e2e20c55558e46cf99,edb4b8adc2447bc04e05b9b908195a4bc7926242
|
||||
115,asf__nifi_CVE-2023-34468_1.21.0,CVE-2023-34468,CWE-094,Improper Control of Generation of Code ('Code Injection'),apache,nifi,1.21.0,https://github.com/apache/nifi,GHSA-xm2m-2q6h-22jw,892f822107da84ca0dcfefdb5c91c5bc11dc3dc1,4faf3ea59895e7e153db3f8f61147ff70a254361
|
||||
116,apache__rocketmq_CVE-2023-37582_4.9.6,CVE-2023-37582,CWE-094,Improper Control of Generation of Code ('Code Injection'),apache,rocketmq,4.9.6,https://github.com/apache/rocketmq,GHSA-gpq8-963w-8qc9,db4ba459bec9392ac37647ff1a4d24d30466814d,fb1c67d536c95ec7bd5904e61b9d97c4c2ee5a3d
|
||||
117,asf__nifi_CVE-2023-36542_1.22.0,CVE-2023-36542,CWE-094,Improper Control of Generation of Code ('Code Injection'),apache,nifi,1.22.0,https://github.com/apache/nifi,GHSA-r969-8v3h-23v9,71e3ea9f2c58d0cf2ce6824c388f2bd3e917dfc8,532578799c
|
||||
118,apache__rocketmq_CVE-2023-33246_5.1.0,CVE-2023-33246,CWE-094,Improper Control of Generation of Code ('Code Injection'),apache,rocketmq,5.1.0,https://github.com/apache/rocketmq,GHSA-x3cq-8f32-5f63,b8e9334d2a1ed8868a3b15b63b8ef3198fcb81ce,9d411cf04a695e7a3f41036e8377b0aa544d754d;c3ada731405c5990c36bf58d50b3e61965300703
|
||||
119,apache__dolphinscheduler_CVE-2023-51770_3.2.0,CVE-2023-51770,CWE-094,Improper Control of Generation of Code ('Code Injection'),apache,dolphinscheduler,3.2.0,https://github.com/apache/dolphinscheduler,GHSA-ff2w-wm48-jhqj,f64b254809f21f811eaef780d489a43b490ca327,309c8c97a9b9003244496dedc7861a5026f9441a
|
||||
120,apache__dolphinscheduler_CVE-2023-49109_3.2.0,CVE-2023-49109,CWE-094,Improper Control of Generation of Code ('Code Injection'),apache,dolphinscheduler,3.2.0,https://github.com/apache/dolphinscheduler,GHSA-qwxx-xww6-8q8m,f64b254809f21f811eaef780d489a43b490ca327,8c01fcf14b199e2c1ba86c17351e1ea30614f484
|
||||
|
@@ -0,0 +1,27 @@
|
||||
package cn.hutool.core.util;
|
||||
|
||||
import java.io.File;
|
||||
import java.nio.charset.Charset;
|
||||
import java.util.Enumeration;
|
||||
import java.util.zip.ZipEntry;
|
||||
import java.util.zip.ZipFile;
|
||||
|
||||
/**
|
||||
* Excerpt of hutool ZipUtil.unzip after CVE-2018-17297 (Zip Slip / CWE-22).
|
||||
* https://github.com/dromara/hutool/commit/8d7d0b7fb5ea4f7447b40131bffc1ec506a6528e
|
||||
*/
|
||||
public class ZipUtil {
|
||||
public static File unzip(File zipFile, File outFile, Charset charset) throws Exception {
|
||||
ZipFile zipFileObj = new ZipFile(zipFile, charset);
|
||||
Enumeration<? extends ZipEntry> em = zipFileObj.entries();
|
||||
while (em.hasMoreElements()) {
|
||||
ZipEntry zipEntry = em.nextElement();
|
||||
File outItemFile = FileUtil.file(outFile, zipEntry.getName());
|
||||
if (zipEntry.isDirectory()) {
|
||||
outItemFile.mkdirs();
|
||||
}
|
||||
}
|
||||
zipFileObj.close();
|
||||
return outFile;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,28 @@
|
||||
package cn.hutool.core.util;
|
||||
|
||||
import java.io.File;
|
||||
import java.nio.charset.Charset;
|
||||
import java.util.Enumeration;
|
||||
import java.util.zip.ZipEntry;
|
||||
import java.util.zip.ZipFile;
|
||||
|
||||
/**
|
||||
* Excerpt of hutool ZipUtil.unzip before CVE-2018-17297 (Zip Slip / CWE-22).
|
||||
* https://github.com/dromara/hutool/commit/8d7d0b7fb5ea4f7447b40131bffc1ec506a6528e
|
||||
* parent fd77bb8718648f69a587046b735488a80123cc26
|
||||
*/
|
||||
public class ZipUtil {
|
||||
public static File unzip(File zipFile, File outFile, Charset charset) throws Exception {
|
||||
ZipFile zipFileObj = new ZipFile(zipFile, charset);
|
||||
Enumeration<? extends ZipEntry> em = zipFileObj.entries();
|
||||
while (em.hasMoreElements()) {
|
||||
ZipEntry zipEntry = em.nextElement();
|
||||
File outItemFile = new File(outFile, zipEntry.getName());
|
||||
if (zipEntry.isDirectory()) {
|
||||
outItemFile.mkdirs();
|
||||
}
|
||||
}
|
||||
zipFileObj.close();
|
||||
return outFile;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,6 @@
|
||||
// Fixed counterpart of the node-serialize CVE-2017-5941 eval pattern (CWE-95).
|
||||
function parsePayload(obj) {
|
||||
return JSON.parse(obj);
|
||||
}
|
||||
|
||||
module.exports = { parsePayload };
|
||||
@@ -0,0 +1,7 @@
|
||||
// Pattern from npm node-serialize CVE-2017-5941 (CWE-95): unserialize via eval.
|
||||
// Public advisory: https://nvd.nist.gov/vuln/detail/CVE-2017-5941
|
||||
function parsePayload(obj) {
|
||||
return eval("(" + obj + ")");
|
||||
}
|
||||
|
||||
module.exports = { parsePayload };
|
||||
@@ -0,0 +1,10 @@
|
||||
# Provenance: SVEN train CWE-78 function pair from
|
||||
# https://github.com/Internet-of-People/titania-os/commit/9b7805119938343fcac9dc929d8882f1d97cf14a
|
||||
# file vuedj/configtitania/views.py function add_user
|
||||
import crypt
|
||||
import subprocess
|
||||
|
||||
|
||||
def add_user(username, password):
|
||||
encPass = crypt.crypt(password, "22")
|
||||
subprocess.call(["useradd", "-G", "docker,wheel", "-p", encPass, username])
|
||||
@@ -0,0 +1,10 @@
|
||||
# Provenance: SVEN train CWE-78 function pair from
|
||||
# https://github.com/Internet-of-People/titania-os/commit/9b7805119938343fcac9dc929d8882f1d97cf14a
|
||||
# file vuedj/configtitania/views.py function add_user
|
||||
import crypt
|
||||
import os
|
||||
|
||||
|
||||
def add_user(username, password):
|
||||
encPass = crypt.crypt(password, "22")
|
||||
os.system("useradd -G docker,wheel -p " + encPass + " " + username)
|
||||
@@ -0,0 +1,22 @@
|
||||
# Provenance: SVEN train CWE-78 function pair from
|
||||
# https://github.com/google/mobly/commit/3862e8ba359040fbdd6e1a6d36e51d07cda8e1ee
|
||||
# file mobly/controllers/android_device_lib/adb.py function _exec_cmd
|
||||
import logging
|
||||
import subprocess
|
||||
|
||||
|
||||
class AdbError(Exception):
|
||||
def __init__(self, **kwargs):
|
||||
super().__init__(kwargs)
|
||||
|
||||
|
||||
class Adb:
|
||||
def _exec_cmd(self, args, shell):
|
||||
"""Executes adb commands."""
|
||||
proc = subprocess.Popen(args, stdout=subprocess.PIPE, stderr=subprocess.PIPE, shell=shell)
|
||||
(out, err) = proc.communicate()
|
||||
ret = proc.returncode
|
||||
logging.debug("cmd: %s, stdout: %s, stderr: %s, ret: %s", args, out, err, ret)
|
||||
if ret == 0:
|
||||
return out
|
||||
raise AdbError(cmd=args, stdout=out, stderr=err, ret_code=ret)
|
||||
@@ -0,0 +1,22 @@
|
||||
# Provenance: SVEN train CWE-78 function pair from
|
||||
# https://github.com/google/mobly/commit/3862e8ba359040fbdd6e1a6d36e51d07cda8e1ee
|
||||
# file mobly/controllers/android_device_lib/adb.py function _exec_cmd
|
||||
import logging
|
||||
import subprocess
|
||||
|
||||
|
||||
class AdbError(Exception):
|
||||
def __init__(self, **kwargs):
|
||||
super().__init__(kwargs)
|
||||
|
||||
|
||||
class Adb:
|
||||
def _exec_cmd(self, cmd):
|
||||
"""Executes adb commands in a new shell."""
|
||||
proc = subprocess.Popen(cmd, stdout=subprocess.PIPE, stderr=subprocess.PIPE, shell=True)
|
||||
(out, err) = proc.communicate()
|
||||
ret = proc.returncode
|
||||
logging.debug("cmd: %s, stdout: %s, stderr: %s, ret: %s", cmd, out, err, ret)
|
||||
if ret == 0:
|
||||
return out
|
||||
raise AdbError(cmd=cmd, stdout=out, stderr=err, ret_code=ret)
|
||||
@@ -0,0 +1,22 @@
|
||||
# Provenance: SVEN train CWE-89 function pair from
|
||||
# https://github.com/russ-lewis/ttt_-_python_cgi/commit/6096f43fd4b2d91211eec4614b7960c0816900da
|
||||
# file cgi/common.py function build_board
|
||||
|
||||
|
||||
def build_board(conn, game, size):
|
||||
board = []
|
||||
for i in range(size):
|
||||
board.append([""] * size)
|
||||
|
||||
cursor = conn.cursor()
|
||||
cursor.execute("SELECT x,y,letter FROM moves WHERE gameID = %d;", (game,))
|
||||
|
||||
counts = {"X": 0, "O": 0}
|
||||
for move in cursor.fetchall():
|
||||
(x, y, letter) = move
|
||||
x = int(x)
|
||||
y = int(y)
|
||||
board[x][y] = letter
|
||||
counts[letter] += 1
|
||||
cursor.close()
|
||||
return (board, counts)
|
||||
@@ -0,0 +1,22 @@
|
||||
# Provenance: SVEN train CWE-89 function pair from
|
||||
# https://github.com/russ-lewis/ttt_-_python_cgi/commit/6096f43fd4b2d91211eec4614b7960c0816900da
|
||||
# file cgi/common.py function build_board
|
||||
|
||||
|
||||
def build_board(conn, game, size):
|
||||
board = []
|
||||
for i in range(size):
|
||||
board.append([""] * size)
|
||||
|
||||
cursor = conn.cursor()
|
||||
cursor.execute("SELECT x,y,letter FROM moves WHERE gameID = %d;" % game)
|
||||
|
||||
counts = {"X": 0, "O": 0}
|
||||
for move in cursor.fetchall():
|
||||
(x, y, letter) = move
|
||||
x = int(x)
|
||||
y = int(y)
|
||||
board[x][y] = letter
|
||||
counts[letter] += 1
|
||||
cursor.close()
|
||||
return (board, counts)
|
||||
@@ -0,0 +1,14 @@
|
||||
# Provenance: SVEN train CWE-89 function pair from
|
||||
# https://github.com/pukkapies/urop2019/commit/3ca2e2c291d2d5fe262d20a8e0520bdfb622432b
|
||||
# file modules/query_lastfm.py function tag_num_to_tag
|
||||
|
||||
|
||||
class QueryStore:
|
||||
def tag_num_to_tag(self, tag_num):
|
||||
"""Returns tag given tag_num."""
|
||||
q = "SELECT tag FROM tags WHERE rowid = ?"
|
||||
self.query(q, tag_num)
|
||||
return self.c.fetchone()[0]
|
||||
|
||||
def query(self, q, *args):
|
||||
return q
|
||||
@@ -0,0 +1,14 @@
|
||||
# Provenance: SVEN train CWE-89 function pair from
|
||||
# https://github.com/pukkapies/urop2019/commit/3ca2e2c291d2d5fe262d20a8e0520bdfb622432b
|
||||
# file modules/query_lastfm.py function tag_num_to_tag
|
||||
|
||||
|
||||
class QueryStore:
|
||||
def tag_num_to_tag(self, tag_num):
|
||||
"""Returns tag given tag_num."""
|
||||
q = "SELECT tag FROM tags WHERE rowid = '" + str(tag_num) + "'"
|
||||
self.query(q)
|
||||
return self.c.fetchone()[0]
|
||||
|
||||
def query(self, q):
|
||||
return q
|
||||
@@ -0,0 +1,21 @@
|
||||
# SAST bake-off slice (OWASP + Juliet + Python)
|
||||
|
||||
Labeled true/false cases from the suites SAST papers actually quote. Not
|
||||
cheat-sheet fixtures and not the 90% smoke gate.
|
||||
|
||||
| Suite | Upstream | License | Protocol |
|
||||
| --- | --- | --- | --- |
|
||||
| OWASP Benchmark Java v1.2 | [OWASP-Benchmark/BenchmarkJava](https://github.com/OWASP-Benchmark/BenchmarkJava) | GPL-2.0 | true file = TP if we fire; false file = FP if we fire. Score = TPR − FPR. |
|
||||
| OWASP Benchmark Python v0.1 | [OWASP-Benchmark/BenchmarkPython](https://github.com/OWASP-Benchmark/BenchmarkPython) | GPL-3.0 | Same CSV protocol (`expectedresults-0.1.csv`). |
|
||||
| Juliet C 1.3 | [arichardson/juliet-test-suite-c](https://github.com/arichardson/juliet-test-suite-c) | CC0 | `bad()` vs `goodB2G()` / `goodG2B()`. |
|
||||
| Juliet Java 1.3 | [UnitTestBot/juliet-java-test-suite](https://github.com/UnitTestBot/juliet-java-test-suite) | CC0 | `bad()` vs `goodG2B()` (same sink, hardcoded source). |
|
||||
|
||||
This directory vendors a **representative slice**, not the full 2,740 / 180k cases.
|
||||
|
||||
```bash
|
||||
uv run ousast pairs --slice sast
|
||||
```
|
||||
|
||||
`slice=sast` is an honesty dashboard: CI still only fails the local fixture pairs.
|
||||
Juliet `goodG2B` often keeps the dangerous sink (`strcpy`, `Runtime.exec`); a
|
||||
regex harness is *supposed* to keep firing there.
|
||||
@@ -0,0 +1,253 @@
|
||||
# Labeled SAST bake-off slice. OWASP true/false files and Juliet bad/good sinks.
|
||||
# slice = "sast" — honesty dashboard, not the local 100% CI gate.
|
||||
# Do not add these names to LANGUAGE_MANIFESTS.
|
||||
|
||||
# --- OWASP Benchmark for Python v0.1 ---
|
||||
|
||||
[[pair]]
|
||||
name = "owasp-python-codeinj"
|
||||
slice = "sast"
|
||||
language = "python"
|
||||
origin = "owasp-benchmark-python"
|
||||
license = "GPL-3.0"
|
||||
repo = "OWASP-Benchmark/BenchmarkPython"
|
||||
cwe = "CWE-94"
|
||||
vuln = "owasp-python/BenchmarkTest00074.py"
|
||||
fixed = "owasp-python/BenchmarkTest00073.py"
|
||||
relpath = "testcode/BenchmarkTest00074.py"
|
||||
min_recall = 1.0
|
||||
fix_policy = "silent"
|
||||
|
||||
[[pair.expected]]
|
||||
cwe = "CWE-94"
|
||||
class = "code injection"
|
||||
path = "testcode/BenchmarkTest00074.py"
|
||||
rule_id = "python-unsafe-eval"
|
||||
sink = "exec"
|
||||
evidence = "exec executes attacker-controlled input"
|
||||
|
||||
[[pair]]
|
||||
name = "owasp-python-deser"
|
||||
slice = "sast"
|
||||
language = "python"
|
||||
origin = "owasp-benchmark-python"
|
||||
license = "GPL-3.0"
|
||||
repo = "OWASP-Benchmark/BenchmarkPython"
|
||||
cwe = "CWE-502"
|
||||
vuln = "owasp-python/BenchmarkTest00078.py"
|
||||
fixed = "owasp-python/BenchmarkTest00079.py"
|
||||
relpath = "testcode/BenchmarkTest00078.py"
|
||||
min_recall = 1.0
|
||||
fix_policy = "silent"
|
||||
|
||||
[[pair.expected]]
|
||||
cwe = "CWE-502"
|
||||
class = "insecure deserialization"
|
||||
path = "testcode/BenchmarkTest00078.py"
|
||||
rule_id = "python-unsafe-deserialization"
|
||||
sink = "pickle"
|
||||
evidence = "pickle.loads deserializes untrusted input"
|
||||
|
||||
[[pair]]
|
||||
name = "owasp-python-cmdi"
|
||||
slice = "sast"
|
||||
language = "python"
|
||||
origin = "owasp-benchmark-python"
|
||||
license = "GPL-3.0"
|
||||
repo = "OWASP-Benchmark/BenchmarkPython"
|
||||
cwe = "CWE-78"
|
||||
vuln = "owasp-python/BenchmarkTest00165.py"
|
||||
fixed = "owasp-python/BenchmarkTest00350.py"
|
||||
relpath = "testcode/BenchmarkTest00165.py"
|
||||
min_recall = 1.0
|
||||
fix_policy = "silent"
|
||||
|
||||
[[pair.expected]]
|
||||
cwe = "CWE-78"
|
||||
class = "command injection"
|
||||
path = "testcode/BenchmarkTest00165.py"
|
||||
rule_id = "python-shell-true"
|
||||
sink = "subprocess"
|
||||
evidence = "subprocess runs an attacker-controlled command"
|
||||
|
||||
[[pair]]
|
||||
name = "owasp-python-sqli"
|
||||
slice = "sast"
|
||||
language = "python"
|
||||
origin = "owasp-benchmark-python"
|
||||
license = "GPL-3.0"
|
||||
repo = "OWASP-Benchmark/BenchmarkPython"
|
||||
cwe = "CWE-89"
|
||||
vuln = "owasp-python/BenchmarkTest00099.py"
|
||||
fixed = "owasp-python/BenchmarkTest00011.py"
|
||||
relpath = "testcode/BenchmarkTest00099.py"
|
||||
min_recall = 1.0
|
||||
fix_policy = "silent"
|
||||
|
||||
[[pair.expected]]
|
||||
cwe = "CWE-89"
|
||||
class = "sql injection"
|
||||
path = "testcode/BenchmarkTest00099.py"
|
||||
rule_id = "python-sql-injection"
|
||||
sink = "execute"
|
||||
evidence = "execute runs a SQL string built from request input"
|
||||
|
||||
[[pair]]
|
||||
name = "owasp-python-hash"
|
||||
slice = "sast"
|
||||
language = "python"
|
||||
origin = "owasp-benchmark-python"
|
||||
license = "GPL-3.0"
|
||||
repo = "OWASP-Benchmark/BenchmarkPython"
|
||||
cwe = "CWE-327"
|
||||
vuln = "owasp-python/BenchmarkTest00054.py"
|
||||
fixed = "owasp-python/BenchmarkTest00055.py"
|
||||
relpath = "testcode/BenchmarkTest00054.py"
|
||||
min_recall = 1.0
|
||||
fix_policy = "silent"
|
||||
|
||||
[[pair.expected]]
|
||||
cwe = "CWE-327"
|
||||
class = "weak cryptography"
|
||||
path = "testcode/BenchmarkTest00054.py"
|
||||
rule_id = "python-weak-hash"
|
||||
sink = "md5"
|
||||
evidence = "md5 is a weak hash"
|
||||
|
||||
# --- OWASP Benchmark Java v1.2 ---
|
||||
|
||||
[[pair]]
|
||||
name = "owasp-java-cmdi"
|
||||
slice = "sast"
|
||||
language = "java"
|
||||
origin = "owasp-benchmark-java"
|
||||
license = "GPL-2.0"
|
||||
repo = "OWASP-Benchmark/BenchmarkJava"
|
||||
cwe = "CWE-78"
|
||||
vuln = "owasp-java/BenchmarkTest00007.java"
|
||||
fixed = "owasp-java/BenchmarkTest00090.java"
|
||||
relpath = "org/owasp/benchmark/testcode/BenchmarkTest00007.java"
|
||||
min_recall = 1.0
|
||||
fix_policy = "silent"
|
||||
|
||||
[[pair.expected]]
|
||||
cwe = "CWE-78"
|
||||
class = "command injection"
|
||||
path = "org/owasp/benchmark/testcode/BenchmarkTest00007.java"
|
||||
rule_id = "java-command-exec"
|
||||
sink = "exec"
|
||||
evidence = "Runtime.exec runs an attacker-controlled command"
|
||||
|
||||
[[pair]]
|
||||
name = "owasp-java-sqli"
|
||||
slice = "sast"
|
||||
language = "java"
|
||||
origin = "owasp-benchmark-java"
|
||||
license = "GPL-2.0"
|
||||
repo = "OWASP-Benchmark/BenchmarkJava"
|
||||
cwe = "CWE-89"
|
||||
vuln = "owasp-java/BenchmarkTest00008.java"
|
||||
fixed = "owasp-java/BenchmarkTest00052.java"
|
||||
relpath = "org/owasp/benchmark/testcode/BenchmarkTest00008.java"
|
||||
min_recall = 1.0
|
||||
fix_policy = "silent"
|
||||
|
||||
[[pair.expected]]
|
||||
cwe = "CWE-89"
|
||||
class = "sql injection"
|
||||
path = "org/owasp/benchmark/testcode/BenchmarkTest00008.java"
|
||||
rule_id = "java-sql-injection"
|
||||
sink = "prepareCall"
|
||||
evidence = "SQL is concatenated with request input"
|
||||
|
||||
[[pair]]
|
||||
name = "owasp-java-hash"
|
||||
slice = "sast"
|
||||
language = "java"
|
||||
origin = "owasp-benchmark-java"
|
||||
license = "GPL-2.0"
|
||||
repo = "OWASP-Benchmark/BenchmarkJava"
|
||||
cwe = "CWE-327"
|
||||
vuln = "owasp-java/BenchmarkTest00003.java"
|
||||
fixed = "owasp-java/BenchmarkTest00009.java"
|
||||
relpath = "org/owasp/benchmark/testcode/BenchmarkTest00003.java"
|
||||
min_recall = 1.0
|
||||
fix_policy = "silent"
|
||||
|
||||
[[pair.expected]]
|
||||
cwe = "CWE-327"
|
||||
class = "weak cryptography"
|
||||
path = "org/owasp/benchmark/testcode/BenchmarkTest00003.java"
|
||||
rule_id = "java-weak-hash"
|
||||
sink = "MessageDigest"
|
||||
evidence = "MessageDigest uses a weak hash algorithm"
|
||||
|
||||
# --- Juliet C/C++ 1.3 (CC0) ---
|
||||
|
||||
[[pair]]
|
||||
name = "juliet-c-cwe134-printf"
|
||||
slice = "sast"
|
||||
language = "c_cpp"
|
||||
origin = "juliet-c"
|
||||
license = "CC0-1.0"
|
||||
repo = "arichardson/juliet-test-suite-c"
|
||||
cwe = "CWE-134"
|
||||
vuln = "juliet-c/cwe134-printf-vuln.c"
|
||||
fixed = "juliet-c/cwe134-printf-fixed.c"
|
||||
relpath = "CWE134_char_console_printf_01.c"
|
||||
min_recall = 1.0
|
||||
fix_policy = "silent"
|
||||
|
||||
[[pair.expected]]
|
||||
cwe = "CWE-134"
|
||||
class = "format string"
|
||||
path = "CWE134_char_console_printf_01.c"
|
||||
rule_id = "c-unsafe-format"
|
||||
sink = "printf"
|
||||
evidence = "printf uses attacker-controlled format string"
|
||||
|
||||
[[pair]]
|
||||
name = "juliet-c-cwe121-strcpy"
|
||||
slice = "sast"
|
||||
language = "c_cpp"
|
||||
origin = "juliet-c"
|
||||
license = "CC0-1.0"
|
||||
repo = "arichardson/juliet-test-suite-c"
|
||||
cwe = "CWE-120"
|
||||
vuln = "juliet-c/cwe121-strcpy-vuln.c"
|
||||
fixed = "juliet-c/cwe121-strcpy-fixed.c"
|
||||
relpath = "CWE121_char_declare_cpy_01.c"
|
||||
min_recall = 1.0
|
||||
fix_policy = "silent"
|
||||
|
||||
[[pair.expected]]
|
||||
cwe = "CWE-120"
|
||||
class = "buffer overflow"
|
||||
path = "CWE121_char_declare_cpy_01.c"
|
||||
rule_id = "c-unsafe-copy"
|
||||
sink = "strcpy"
|
||||
evidence = "strcpy copies into a buffer without a null terminator"
|
||||
|
||||
# --- Juliet Java 1.3 (CC0) ---
|
||||
|
||||
[[pair]]
|
||||
name = "juliet-java-cwe78-exec"
|
||||
slice = "sast"
|
||||
language = "java"
|
||||
origin = "juliet-java"
|
||||
license = "CC0-1.0"
|
||||
repo = "UnitTestBot/juliet-java-test-suite"
|
||||
cwe = "CWE-78"
|
||||
vuln = "juliet-java/cwe78-exec-vuln.java"
|
||||
fixed = "juliet-java/cwe78-exec-fixed.java"
|
||||
relpath = "CWE78_OS_Command_Injection__console_readLine_01.java"
|
||||
min_recall = 1.0
|
||||
fix_policy = "silent"
|
||||
|
||||
[[pair.expected]]
|
||||
cwe = "CWE-78"
|
||||
class = "command injection"
|
||||
path = "CWE78_OS_Command_Injection__console_readLine_01.java"
|
||||
rule_id = "java-command-exec"
|
||||
sink = "exec"
|
||||
evidence = "Runtime.exec concatenates attacker-controlled input into a command"
|
||||
+99
@@ -0,0 +1,99 @@
|
||||
/* TEMPLATE GENERATED TESTCASE FILE
|
||||
Filename: CWE121_Stack_Based_Buffer_Overflow__CWE193_char_declare_cpy_01.c
|
||||
Label Definition File: CWE121_Stack_Based_Buffer_Overflow__CWE193.label.xml
|
||||
Template File: sources-sink-01.tmpl.c
|
||||
*/
|
||||
/*
|
||||
* @description
|
||||
* CWE: 121 Stack Based Buffer Overflow
|
||||
* BadSource: Point data to a buffer that does not have space for a NULL terminator
|
||||
* GoodSource: Point data to a buffer that includes space for a NULL terminator
|
||||
* Sink: cpy
|
||||
* BadSink : Copy string to data using strcpy()
|
||||
* Flow Variant: 01 Baseline
|
||||
*
|
||||
* */
|
||||
|
||||
#include "std_testcase.h"
|
||||
|
||||
#ifndef _WIN32
|
||||
#include <wchar.h>
|
||||
#endif
|
||||
|
||||
/* MAINTENANCE NOTE: The length of this string should equal the 10 */
|
||||
#define SRC_STRING "AAAAAAAAAA"
|
||||
|
||||
#ifndef OMITBAD
|
||||
|
||||
void CWE121_Stack_Based_Buffer_Overflow__CWE193_char_declare_cpy_01_bad()
|
||||
{
|
||||
char * data;
|
||||
char dataBadBuffer[10];
|
||||
char dataGoodBuffer[10+1];
|
||||
/* FLAW: Set a pointer to a buffer that does not leave room for a NULL terminator when performing
|
||||
* string copies in the sinks */
|
||||
data = dataBadBuffer;
|
||||
data[0] = '\0'; /* null terminate */
|
||||
{
|
||||
char source[10+1] = SRC_STRING;
|
||||
/* POTENTIAL FLAW: data may not have enough space to hold source */
|
||||
strcpy(data, source);
|
||||
printLine(data);
|
||||
}
|
||||
}
|
||||
|
||||
#endif /* OMITBAD */
|
||||
|
||||
#ifndef OMITGOOD
|
||||
|
||||
/* goodG2B uses the GoodSource with the BadSink */
|
||||
static void goodG2B()
|
||||
{
|
||||
char * data;
|
||||
char dataBadBuffer[10];
|
||||
char dataGoodBuffer[10+1];
|
||||
/* FIX: Set a pointer to a buffer that leaves room for a NULL terminator when performing
|
||||
* string copies in the sinks */
|
||||
data = dataGoodBuffer;
|
||||
data[0] = '\0'; /* null terminate */
|
||||
{
|
||||
char source[10+1] = SRC_STRING;
|
||||
/* POTENTIAL FLAW: data may not have enough space to hold source */
|
||||
strcpy(data, source);
|
||||
printLine(data);
|
||||
}
|
||||
}
|
||||
|
||||
void CWE121_Stack_Based_Buffer_Overflow__CWE193_char_declare_cpy_01_good()
|
||||
{
|
||||
goodG2B();
|
||||
}
|
||||
|
||||
#endif /* OMITGOOD */
|
||||
|
||||
/* Below is the main(). It is only used when building this testcase on
|
||||
* its own for testing or for building a binary to use in testing binary
|
||||
* analysis tools. It is not used when compiling all the testcases as one
|
||||
* application, which is how source code analysis tools are tested.
|
||||
*/
|
||||
|
||||
#ifdef INCLUDEMAIN
|
||||
|
||||
int main(int argc, char * argv[])
|
||||
{
|
||||
/* seed randomness */
|
||||
srand( (unsigned)time(NULL) );
|
||||
#ifndef OMITGOOD
|
||||
printLine("Calling good()...");
|
||||
CWE121_Stack_Based_Buffer_Overflow__CWE193_char_declare_cpy_01_good();
|
||||
printLine("Finished good()");
|
||||
#endif /* OMITGOOD */
|
||||
#ifndef OMITBAD
|
||||
printLine("Calling bad()...");
|
||||
CWE121_Stack_Based_Buffer_Overflow__CWE193_char_declare_cpy_01_bad();
|
||||
printLine("Finished bad()");
|
||||
#endif /* OMITBAD */
|
||||
return 0;
|
||||
}
|
||||
|
||||
#endif
|
||||
+143
@@ -0,0 +1,143 @@
|
||||
/* TEMPLATE GENERATED TESTCASE FILE
|
||||
Filename: CWE134_Uncontrolled_Format_String__char_console_printf_01.c
|
||||
Label Definition File: CWE134_Uncontrolled_Format_String.label.xml
|
||||
Template File: sources-sinks-01.tmpl.c
|
||||
*/
|
||||
/*
|
||||
* @description
|
||||
* CWE: 134 Uncontrolled Format String
|
||||
* BadSource: console Read input from the console
|
||||
* GoodSource: Copy a fixed string into data
|
||||
* Sinks: printf
|
||||
* GoodSink: printf with "%s" as the first argument and data as the second
|
||||
* BadSink : printf with only data as an argument
|
||||
* Flow Variant: 01 Baseline
|
||||
*
|
||||
* */
|
||||
|
||||
#include "std_testcase.h"
|
||||
|
||||
#ifndef _WIN32
|
||||
#include <wchar.h>
|
||||
#endif
|
||||
|
||||
#ifndef OMITBAD
|
||||
|
||||
void CWE134_Uncontrolled_Format_String__char_console_printf_01_bad()
|
||||
{
|
||||
char * data;
|
||||
char dataBuffer[100] = "";
|
||||
data = dataBuffer;
|
||||
{
|
||||
/* Read input from the console */
|
||||
size_t dataLen = strlen(data);
|
||||
/* if there is room in data, read into it from the console */
|
||||
if (100-dataLen > 1)
|
||||
{
|
||||
/* POTENTIAL FLAW: Read data from the console */
|
||||
if (fgets(data+dataLen, (int)(100-dataLen), stdin) != NULL)
|
||||
{
|
||||
/* The next few lines remove the carriage return from the string that is
|
||||
* inserted by fgets() */
|
||||
dataLen = strlen(data);
|
||||
if (dataLen > 0 && data[dataLen-1] == '\n')
|
||||
{
|
||||
data[dataLen-1] = '\0';
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
printLine("fgets() failed");
|
||||
/* Restore NUL terminator if fgets fails */
|
||||
data[dataLen] = '\0';
|
||||
}
|
||||
}
|
||||
}
|
||||
/* POTENTIAL FLAW: Do not specify the format allowing a possible format string vulnerability */
|
||||
printf(data);
|
||||
}
|
||||
|
||||
#endif /* OMITBAD */
|
||||
|
||||
#ifndef OMITGOOD
|
||||
|
||||
/* goodG2B uses the GoodSource with the BadSink */
|
||||
static void goodG2B()
|
||||
{
|
||||
char * data;
|
||||
char dataBuffer[100] = "";
|
||||
data = dataBuffer;
|
||||
/* FIX: Use a fixed string that does not contain a format specifier */
|
||||
strcpy(data, "fixedstringtest");
|
||||
/* POTENTIAL FLAW: Do not specify the format allowing a possible format string vulnerability */
|
||||
printf(data);
|
||||
}
|
||||
|
||||
/* goodB2G uses the BadSource with the GoodSink */
|
||||
static void goodB2G()
|
||||
{
|
||||
char * data;
|
||||
char dataBuffer[100] = "";
|
||||
data = dataBuffer;
|
||||
{
|
||||
/* Read input from the console */
|
||||
size_t dataLen = strlen(data);
|
||||
/* if there is room in data, read into it from the console */
|
||||
if (100-dataLen > 1)
|
||||
{
|
||||
/* POTENTIAL FLAW: Read data from the console */
|
||||
if (fgets(data+dataLen, (int)(100-dataLen), stdin) != NULL)
|
||||
{
|
||||
/* The next few lines remove the carriage return from the string that is
|
||||
* inserted by fgets() */
|
||||
dataLen = strlen(data);
|
||||
if (dataLen > 0 && data[dataLen-1] == '\n')
|
||||
{
|
||||
data[dataLen-1] = '\0';
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
printLine("fgets() failed");
|
||||
/* Restore NUL terminator if fgets fails */
|
||||
data[dataLen] = '\0';
|
||||
}
|
||||
}
|
||||
}
|
||||
/* FIX: Specify the format disallowing a format string vulnerability */
|
||||
printf("%s\n", data);
|
||||
}
|
||||
|
||||
void CWE134_Uncontrolled_Format_String__char_console_printf_01_good()
|
||||
{
|
||||
goodG2B();
|
||||
goodB2G();
|
||||
}
|
||||
|
||||
#endif /* OMITGOOD */
|
||||
|
||||
/* Below is the main(). It is only used when building this testcase on
|
||||
its own for testing or for building a binary to use in testing binary
|
||||
analysis tools. It is not used when compiling all the testcases as one
|
||||
application, which is how source code analysis tools are tested. */
|
||||
|
||||
#ifdef INCLUDEMAIN
|
||||
|
||||
int main(int argc, char * argv[])
|
||||
{
|
||||
/* seed randomness */
|
||||
srand( (unsigned)time(NULL) );
|
||||
#ifndef OMITGOOD
|
||||
printLine("Calling good()...");
|
||||
CWE134_Uncontrolled_Format_String__char_console_printf_01_good();
|
||||
printLine("Finished good()");
|
||||
#endif /* OMITGOOD */
|
||||
#ifndef OMITBAD
|
||||
printLine("Calling bad()...");
|
||||
CWE134_Uncontrolled_Format_String__char_console_printf_01_bad();
|
||||
printLine("Finished bad()");
|
||||
#endif /* OMITBAD */
|
||||
return 0;
|
||||
}
|
||||
|
||||
#endif
|
||||
@@ -0,0 +1,10 @@
|
||||
/* Juliet CWE-121 goodG2B still copies with strcpy (larger buffer, same sink).
|
||||
* Regex SAST is expected to keep firing — that is the Juliet goodG2B trap.
|
||||
* Upstream: CWE121_Stack_Based_Buffer_Overflow__CWE193_char_declare_cpy_01.c
|
||||
*/
|
||||
#include <string.h>
|
||||
|
||||
void CWE121_char_declare_cpy_01_goodG2B(char *data, char *source)
|
||||
{
|
||||
strcpy(data, source);
|
||||
}
|
||||
@@ -0,0 +1,11 @@
|
||||
/* Juliet CWE-121 flow variant 01 — bad sink only.
|
||||
* Upstream: CWE121_Stack_Based_Buffer_Overflow__CWE193_char_declare_cpy_01.c
|
||||
* https://github.com/arichardson/juliet-test-suite-c (NIST Juliet 1.3, CC0)
|
||||
*/
|
||||
#include <string.h>
|
||||
|
||||
void CWE121_char_declare_cpy_01_bad(char *data, char *source)
|
||||
{
|
||||
/* POTENTIAL FLAW: data may not have enough space to hold source */
|
||||
strcpy(data, source);
|
||||
}
|
||||
@@ -0,0 +1,11 @@
|
||||
/* Juliet CWE-134 flow variant 01 — goodB2G sink only.
|
||||
* Upstream: CWE134_Uncontrolled_Format_String__char_console_printf_01.c
|
||||
* https://github.com/arichardson/juliet-test-suite-c (NIST Juliet 1.3, CC0)
|
||||
*/
|
||||
#include <stdio.h>
|
||||
|
||||
void CWE134_char_console_printf_01_goodB2G(char *data)
|
||||
{
|
||||
/* FIX: Specify the format disallowing a format string vulnerability */
|
||||
printf("%s\n", data);
|
||||
}
|
||||
@@ -0,0 +1,12 @@
|
||||
/* Juliet CWE-134 flow variant 01 — bad sink only.
|
||||
* Upstream: testcases/CWE134_Uncontrolled_Format_String/s01/
|
||||
* CWE134_Uncontrolled_Format_String__char_console_printf_01.c
|
||||
* https://github.com/arichardson/juliet-test-suite-c (NIST Juliet 1.3, CC0)
|
||||
*/
|
||||
#include <stdio.h>
|
||||
|
||||
void CWE134_char_console_printf_01_bad(char *data)
|
||||
{
|
||||
/* POTENTIAL FLAW: Do not specify the format allowing a format string vulnerability */
|
||||
printf(data);
|
||||
}
|
||||
+143
@@ -0,0 +1,143 @@
|
||||
/* TEMPLATE GENERATED TESTCASE FILE
|
||||
Filename: CWE78_OS_Command_Injection__console_readLine_01.java
|
||||
Label Definition File: CWE78_OS_Command_Injection.label.xml
|
||||
Template File: sources-sink-01.tmpl.java
|
||||
*/
|
||||
/*
|
||||
* @description
|
||||
* CWE: 78 OS Command Injection
|
||||
* BadSource: console_readLine Read data from the console using readLine()
|
||||
* GoodSource: A hardcoded string
|
||||
* BadSink: exec dynamic command execution with Runtime.getRuntime().exec()
|
||||
* Flow Variant: 01 Baseline
|
||||
*
|
||||
* */
|
||||
|
||||
package juliet.testcases.CWE78_OS_Command_Injection;
|
||||
|
||||
import juliet.support.*;
|
||||
|
||||
import javax.servlet.http.*;
|
||||
|
||||
import java.io.BufferedReader;
|
||||
import java.io.InputStreamReader;
|
||||
import java.io.IOException;
|
||||
|
||||
import java.util.logging.Level;
|
||||
|
||||
public class CWE78_OS_Command_Injection__console_readLine_01 extends AbstractTestCase
|
||||
{
|
||||
/* uses badsource and badsink */
|
||||
public void bad() throws Throwable
|
||||
{
|
||||
String data;
|
||||
|
||||
data = ""; /* Initialize data */
|
||||
|
||||
{
|
||||
InputStreamReader readerInputStream = null;
|
||||
BufferedReader readerBuffered = null;
|
||||
|
||||
/* read user input from console with readLine */
|
||||
try
|
||||
{
|
||||
readerInputStream = new InputStreamReader(System.in, "UTF-8");
|
||||
readerBuffered = new BufferedReader(readerInputStream);
|
||||
|
||||
/* POTENTIAL FLAW: Read data from the console using readLine */
|
||||
data = readerBuffered.readLine();
|
||||
}
|
||||
catch (IOException exceptIO)
|
||||
{
|
||||
IO.logger.log(Level.WARNING, "Error with stream reading", exceptIO);
|
||||
}
|
||||
finally
|
||||
{
|
||||
try
|
||||
{
|
||||
if (readerBuffered != null)
|
||||
{
|
||||
readerBuffered.close();
|
||||
}
|
||||
}
|
||||
catch (IOException exceptIO)
|
||||
{
|
||||
IO.logger.log(Level.WARNING, "Error closing BufferedReader", exceptIO);
|
||||
}
|
||||
|
||||
try
|
||||
{
|
||||
if (readerInputStream != null)
|
||||
{
|
||||
readerInputStream.close();
|
||||
}
|
||||
}
|
||||
catch (IOException exceptIO)
|
||||
{
|
||||
IO.logger.log(Level.WARNING, "Error closing InputStreamReader", exceptIO);
|
||||
}
|
||||
}
|
||||
}
|
||||
/* NOTE: Tools may report a flaw here because buffread and isr are not closed. Unfortunately, closing those will close System.in, which will cause any future attempts to read from the console to fail and throw an exception */
|
||||
|
||||
String osCommand;
|
||||
if(System.getProperty("os.name").toLowerCase().indexOf("win") >= 0)
|
||||
{
|
||||
/* running on Windows */
|
||||
osCommand = "c:\\WINDOWS\\SYSTEM32\\cmd.exe /c dir ";
|
||||
}
|
||||
else
|
||||
{
|
||||
/* running on non-Windows */
|
||||
osCommand = "/bin/ls ";
|
||||
}
|
||||
|
||||
/* POTENTIAL FLAW: command injection */
|
||||
Process process = Runtime.getRuntime().exec(osCommand + data);
|
||||
process.waitFor();
|
||||
|
||||
}
|
||||
|
||||
public void good() throws Throwable
|
||||
{
|
||||
goodG2B();
|
||||
}
|
||||
|
||||
/* goodG2B() - uses goodsource and badsink */
|
||||
private void goodG2B() throws Throwable
|
||||
{
|
||||
String data;
|
||||
|
||||
/* FIX: Use a hardcoded string */
|
||||
data = "foo";
|
||||
|
||||
String osCommand;
|
||||
if(System.getProperty("os.name").toLowerCase().indexOf("win") >= 0)
|
||||
{
|
||||
/* running on Windows */
|
||||
osCommand = "c:\\WINDOWS\\SYSTEM32\\cmd.exe /c dir ";
|
||||
}
|
||||
else
|
||||
{
|
||||
/* running on non-Windows */
|
||||
osCommand = "/bin/ls ";
|
||||
}
|
||||
|
||||
/* POTENTIAL FLAW: command injection */
|
||||
Process process = Runtime.getRuntime().exec(osCommand + data);
|
||||
process.waitFor();
|
||||
|
||||
}
|
||||
|
||||
/* Below is the main(). It is only used when building this testcase on
|
||||
* its own for testing or for building a binary to use in testing binary
|
||||
* analysis tools. It is not used when compiling all the juliet.testcases as one
|
||||
* application, which is how source code analysis tools are tested.
|
||||
*/
|
||||
public static void main(String[] args) throws ClassNotFoundException,
|
||||
InstantiationException, IllegalAccessException
|
||||
{
|
||||
mainFromParent(args);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -0,0 +1,12 @@
|
||||
/* Juliet CWE-78 goodG2B — hardcoded source, same Runtime.exec sink.
|
||||
* Regex SAST is expected to keep firing — Juliet goodG2B trap.
|
||||
* Upstream: CWE78_OS_Command_Injection__console_readLine_01.java
|
||||
*/
|
||||
public class CWE78_OS_Command_Injection__console_readLine_01 {
|
||||
public void goodG2B() throws Throwable {
|
||||
String data = "foo";
|
||||
String osCommand = "/bin/ls ";
|
||||
Process process = Runtime.getRuntime().exec(osCommand + data);
|
||||
process.waitFor();
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,11 @@
|
||||
/* Juliet CWE-78 flow variant 01 — bad sink only.
|
||||
* Upstream: CWE78_OS_Command_Injection__console_readLine_01.java
|
||||
* https://github.com/UnitTestBot/juliet-java-test-suite (NIST Juliet 1.3, CC0)
|
||||
*/
|
||||
public class CWE78_OS_Command_Injection__console_readLine_01 {
|
||||
public void bad(String data) throws Throwable {
|
||||
String osCommand = "/bin/ls ";
|
||||
Process process = Runtime.getRuntime().exec(osCommand + data);
|
||||
process.waitFor();
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,120 @@
|
||||
/**
|
||||
* OWASP Benchmark v1.2
|
||||
*
|
||||
* <p>This file is part of the Open Web Application Security Project (OWASP) Benchmark Project. For
|
||||
* details, please see <a
|
||||
* href="https://owasp.org/www-project-benchmark/">https://owasp.org/www-project-benchmark/</a>.
|
||||
*
|
||||
* <p>The OWASP Benchmark is free software: you can redistribute it and/or modify it under the terms
|
||||
* of the GNU General Public License as published by the Free Software Foundation, version 2.
|
||||
*
|
||||
* <p>The OWASP Benchmark is distributed in the hope that it will be useful, but WITHOUT ANY
|
||||
* WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
|
||||
* PURPOSE. See the GNU General Public License for more details.
|
||||
*
|
||||
* @author Dave Wichers
|
||||
* @created 2015
|
||||
*/
|
||||
package org.owasp.benchmark.testcode;
|
||||
|
||||
import java.io.IOException;
|
||||
import javax.servlet.ServletException;
|
||||
import javax.servlet.annotation.WebServlet;
|
||||
import javax.servlet.http.HttpServlet;
|
||||
import javax.servlet.http.HttpServletRequest;
|
||||
import javax.servlet.http.HttpServletResponse;
|
||||
|
||||
@WebServlet(value = "/hash-00/BenchmarkTest00003")
|
||||
public class BenchmarkTest00003 extends HttpServlet {
|
||||
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
@Override
|
||||
public void doGet(HttpServletRequest request, HttpServletResponse response)
|
||||
throws ServletException, IOException {
|
||||
response.setContentType("text/html;charset=UTF-8");
|
||||
javax.servlet.http.Cookie userCookie =
|
||||
new javax.servlet.http.Cookie("BenchmarkTest00003", "someSecret");
|
||||
userCookie.setMaxAge(60 * 3); // Store cookie for 3 minutes
|
||||
userCookie.setSecure(true);
|
||||
userCookie.setHttpOnly(true);
|
||||
userCookie.setPath(request.getRequestURI());
|
||||
userCookie.setDomain(new java.net.URL(request.getRequestURL().toString()).getHost());
|
||||
response.addCookie(userCookie);
|
||||
javax.servlet.RequestDispatcher rd =
|
||||
request.getRequestDispatcher("/hash-00/BenchmarkTest00003.html");
|
||||
rd.include(request, response);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void doPost(HttpServletRequest request, HttpServletResponse response)
|
||||
throws ServletException, IOException {
|
||||
// some code
|
||||
response.setContentType("text/html;charset=UTF-8");
|
||||
|
||||
javax.servlet.http.Cookie[] theCookies = request.getCookies();
|
||||
|
||||
String param = "noCookieValueSupplied";
|
||||
if (theCookies != null) {
|
||||
for (javax.servlet.http.Cookie theCookie : theCookies) {
|
||||
if (theCookie.getName().equals("BenchmarkTest00003")) {
|
||||
param = java.net.URLDecoder.decode(theCookie.getValue(), "UTF-8");
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
try {
|
||||
java.util.Properties benchmarkprops = new java.util.Properties();
|
||||
benchmarkprops.load(
|
||||
this.getClass().getClassLoader().getResourceAsStream("benchmark.properties"));
|
||||
String algorithm = benchmarkprops.getProperty("hashAlg1", "SHA512");
|
||||
java.security.MessageDigest md = java.security.MessageDigest.getInstance(algorithm);
|
||||
byte[] input = {(byte) '?'};
|
||||
Object inputParam = param;
|
||||
if (inputParam instanceof String) input = ((String) inputParam).getBytes();
|
||||
if (inputParam instanceof java.io.InputStream) {
|
||||
byte[] strInput = new byte[1000];
|
||||
int i = ((java.io.InputStream) inputParam).read(strInput);
|
||||
if (i == -1) {
|
||||
response.getWriter()
|
||||
.println(
|
||||
"This input source requires a POST, not a GET. Incompatible UI for the InputStream source.");
|
||||
return;
|
||||
}
|
||||
input = java.util.Arrays.copyOf(strInput, i);
|
||||
}
|
||||
md.update(input);
|
||||
|
||||
byte[] result = md.digest();
|
||||
java.io.File fileTarget =
|
||||
new java.io.File(
|
||||
new java.io.File(org.owasp.benchmark.helpers.Utils.TESTFILES_DIR),
|
||||
"passwordFile.txt");
|
||||
java.io.FileWriter fw =
|
||||
new java.io.FileWriter(fileTarget, true); // the true will append the new data
|
||||
fw.write(
|
||||
"hash_value="
|
||||
+ org.owasp.esapi.ESAPI.encoder().encodeForBase64(result, true)
|
||||
+ "\n");
|
||||
fw.close();
|
||||
response.getWriter()
|
||||
.println(
|
||||
"Sensitive value '"
|
||||
+ org.owasp
|
||||
.esapi
|
||||
.ESAPI
|
||||
.encoder()
|
||||
.encodeForHTML(new String(input))
|
||||
+ "' hashed and stored<br/>");
|
||||
|
||||
} catch (java.security.NoSuchAlgorithmException e) {
|
||||
System.out.println("Problem executing hash - TestCase");
|
||||
throw new ServletException(e);
|
||||
}
|
||||
|
||||
response.getWriter()
|
||||
.println(
|
||||
"Hash Test java.security.MessageDigest.getInstance(java.lang.String) executed");
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,70 @@
|
||||
/**
|
||||
* OWASP Benchmark v1.2
|
||||
*
|
||||
* <p>This file is part of the Open Web Application Security Project (OWASP) Benchmark Project. For
|
||||
* details, please see <a
|
||||
* href="https://owasp.org/www-project-benchmark/">https://owasp.org/www-project-benchmark/</a>.
|
||||
*
|
||||
* <p>The OWASP Benchmark is free software: you can redistribute it and/or modify it under the terms
|
||||
* of the GNU General Public License as published by the Free Software Foundation, version 2.
|
||||
*
|
||||
* <p>The OWASP Benchmark is distributed in the hope that it will be useful, but WITHOUT ANY
|
||||
* WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
|
||||
* PURPOSE. See the GNU General Public License for more details.
|
||||
*
|
||||
* @author Dave Wichers
|
||||
* @created 2015
|
||||
*/
|
||||
package org.owasp.benchmark.testcode;
|
||||
|
||||
import java.io.IOException;
|
||||
import javax.servlet.ServletException;
|
||||
import javax.servlet.annotation.WebServlet;
|
||||
import javax.servlet.http.HttpServlet;
|
||||
import javax.servlet.http.HttpServletRequest;
|
||||
import javax.servlet.http.HttpServletResponse;
|
||||
|
||||
@WebServlet(value = "/cmdi-00/BenchmarkTest00007")
|
||||
public class BenchmarkTest00007 extends HttpServlet {
|
||||
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
@Override
|
||||
public void doGet(HttpServletRequest request, HttpServletResponse response)
|
||||
throws ServletException, IOException {
|
||||
doPost(request, response);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void doPost(HttpServletRequest request, HttpServletResponse response)
|
||||
throws ServletException, IOException {
|
||||
// some code
|
||||
response.setContentType("text/html;charset=UTF-8");
|
||||
|
||||
String param = "";
|
||||
if (request.getHeader("BenchmarkTest00007") != null) {
|
||||
param = request.getHeader("BenchmarkTest00007");
|
||||
}
|
||||
|
||||
// URL Decode the header value since req.getHeader() doesn't. Unlike req.getParameter().
|
||||
param = java.net.URLDecoder.decode(param, "UTF-8");
|
||||
|
||||
String cmd =
|
||||
org.owasp.benchmark.helpers.Utils.getInsecureOSCommandString(
|
||||
this.getClass().getClassLoader());
|
||||
String[] args = {cmd};
|
||||
String[] argsEnv = {param};
|
||||
|
||||
Runtime r = Runtime.getRuntime();
|
||||
|
||||
try {
|
||||
Process p = r.exec(args, argsEnv);
|
||||
org.owasp.benchmark.helpers.Utils.printOSCommandResults(p, response);
|
||||
} catch (IOException e) {
|
||||
System.out.println("Problem executing cmdi - TestCase");
|
||||
response.getWriter()
|
||||
.println(org.owasp.esapi.ESAPI.encoder().encodeForHTML(e.getMessage()));
|
||||
return;
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,67 @@
|
||||
/**
|
||||
* OWASP Benchmark v1.2
|
||||
*
|
||||
* <p>This file is part of the Open Web Application Security Project (OWASP) Benchmark Project. For
|
||||
* details, please see <a
|
||||
* href="https://owasp.org/www-project-benchmark/">https://owasp.org/www-project-benchmark/</a>.
|
||||
*
|
||||
* <p>The OWASP Benchmark is free software: you can redistribute it and/or modify it under the terms
|
||||
* of the GNU General Public License as published by the Free Software Foundation, version 2.
|
||||
*
|
||||
* <p>The OWASP Benchmark is distributed in the hope that it will be useful, but WITHOUT ANY
|
||||
* WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
|
||||
* PURPOSE. See the GNU General Public License for more details.
|
||||
*
|
||||
* @author Dave Wichers
|
||||
* @created 2015
|
||||
*/
|
||||
package org.owasp.benchmark.testcode;
|
||||
|
||||
import java.io.IOException;
|
||||
import javax.servlet.ServletException;
|
||||
import javax.servlet.annotation.WebServlet;
|
||||
import javax.servlet.http.HttpServlet;
|
||||
import javax.servlet.http.HttpServletRequest;
|
||||
import javax.servlet.http.HttpServletResponse;
|
||||
|
||||
@WebServlet(value = "/sqli-00/BenchmarkTest00008")
|
||||
public class BenchmarkTest00008 extends HttpServlet {
|
||||
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
@Override
|
||||
public void doGet(HttpServletRequest request, HttpServletResponse response)
|
||||
throws ServletException, IOException {
|
||||
doPost(request, response);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void doPost(HttpServletRequest request, HttpServletResponse response)
|
||||
throws ServletException, IOException {
|
||||
// some code
|
||||
response.setContentType("text/html;charset=UTF-8");
|
||||
|
||||
String param = "";
|
||||
if (request.getHeader("BenchmarkTest00008") != null) {
|
||||
param = request.getHeader("BenchmarkTest00008");
|
||||
}
|
||||
|
||||
// URL Decode the header value since req.getHeader() doesn't. Unlike req.getParameter().
|
||||
param = java.net.URLDecoder.decode(param, "UTF-8");
|
||||
|
||||
String sql = "{call " + param + "}";
|
||||
|
||||
try {
|
||||
java.sql.Connection connection =
|
||||
org.owasp.benchmark.helpers.DatabaseHelper.getSqlConnection();
|
||||
java.sql.CallableStatement statement = connection.prepareCall(sql);
|
||||
java.sql.ResultSet rs = statement.executeQuery();
|
||||
org.owasp.benchmark.helpers.DatabaseHelper.printResults(rs, sql, response);
|
||||
|
||||
} catch (java.sql.SQLException e) {
|
||||
if (org.owasp.benchmark.helpers.DatabaseHelper.hideSQLErrors) {
|
||||
response.getWriter().println("Error processing request.");
|
||||
} else throw new ServletException(e);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,124 @@
|
||||
/**
|
||||
* OWASP Benchmark v1.2
|
||||
*
|
||||
* <p>This file is part of the Open Web Application Security Project (OWASP) Benchmark Project. For
|
||||
* details, please see <a
|
||||
* href="https://owasp.org/www-project-benchmark/">https://owasp.org/www-project-benchmark/</a>.
|
||||
*
|
||||
* <p>The OWASP Benchmark is free software: you can redistribute it and/or modify it under the terms
|
||||
* of the GNU General Public License as published by the Free Software Foundation, version 2.
|
||||
*
|
||||
* <p>The OWASP Benchmark is distributed in the hope that it will be useful, but WITHOUT ANY
|
||||
* WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
|
||||
* PURPOSE. See the GNU General Public License for more details.
|
||||
*
|
||||
* @author Dave Wichers
|
||||
* @created 2015
|
||||
*/
|
||||
package org.owasp.benchmark.testcode;
|
||||
|
||||
import java.io.IOException;
|
||||
import javax.servlet.ServletException;
|
||||
import javax.servlet.annotation.WebServlet;
|
||||
import javax.servlet.http.HttpServlet;
|
||||
import javax.servlet.http.HttpServletRequest;
|
||||
import javax.servlet.http.HttpServletResponse;
|
||||
|
||||
@WebServlet(value = "/hash-00/BenchmarkTest00009")
|
||||
public class BenchmarkTest00009 extends HttpServlet {
|
||||
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
@Override
|
||||
public void doGet(HttpServletRequest request, HttpServletResponse response)
|
||||
throws ServletException, IOException {
|
||||
doPost(request, response);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void doPost(HttpServletRequest request, HttpServletResponse response)
|
||||
throws ServletException, IOException {
|
||||
// some code
|
||||
response.setContentType("text/html;charset=UTF-8");
|
||||
|
||||
String param = "";
|
||||
java.util.Enumeration<String> names = request.getHeaderNames();
|
||||
while (names.hasMoreElements()) {
|
||||
String name = (String) names.nextElement();
|
||||
|
||||
if (org.owasp.benchmark.helpers.Utils.commonHeaders.contains(name)) {
|
||||
continue; // If standard header, move on to next one
|
||||
}
|
||||
|
||||
java.util.Enumeration<String> values = request.getHeaders(name);
|
||||
if (values != null && values.hasMoreElements()) {
|
||||
param = name; // Grabs the name of the first non-standard header as the parameter
|
||||
// value
|
||||
break;
|
||||
}
|
||||
}
|
||||
// Note: We don't URL decode header names because people don't normally do that
|
||||
|
||||
java.security.Provider[] provider = java.security.Security.getProviders();
|
||||
java.security.MessageDigest md;
|
||||
|
||||
try {
|
||||
if (provider.length > 1) {
|
||||
|
||||
md = java.security.MessageDigest.getInstance("sha-384", provider[0]);
|
||||
} else {
|
||||
md = java.security.MessageDigest.getInstance("sha-384", "SUN");
|
||||
}
|
||||
byte[] input = {(byte) '?'};
|
||||
Object inputParam = param;
|
||||
if (inputParam instanceof String) input = ((String) inputParam).getBytes();
|
||||
if (inputParam instanceof java.io.InputStream) {
|
||||
byte[] strInput = new byte[1000];
|
||||
int i = ((java.io.InputStream) inputParam).read(strInput);
|
||||
if (i == -1) {
|
||||
response.getWriter()
|
||||
.println(
|
||||
"This input source requires a POST, not a GET. Incompatible UI for the InputStream source.");
|
||||
return;
|
||||
}
|
||||
input = java.util.Arrays.copyOf(strInput, i);
|
||||
}
|
||||
md.update(input);
|
||||
|
||||
byte[] result = md.digest();
|
||||
java.io.File fileTarget =
|
||||
new java.io.File(
|
||||
new java.io.File(org.owasp.benchmark.helpers.Utils.TESTFILES_DIR),
|
||||
"passwordFile.txt");
|
||||
java.io.FileWriter fw =
|
||||
new java.io.FileWriter(fileTarget, true); // the true will append the new data
|
||||
fw.write(
|
||||
"hash_value="
|
||||
+ org.owasp.esapi.ESAPI.encoder().encodeForBase64(result, true)
|
||||
+ "\n");
|
||||
fw.close();
|
||||
response.getWriter()
|
||||
.println(
|
||||
"Sensitive value '"
|
||||
+ org.owasp
|
||||
.esapi
|
||||
.ESAPI
|
||||
.encoder()
|
||||
.encodeForHTML(new String(input))
|
||||
+ "' hashed and stored<br/>");
|
||||
|
||||
} catch (java.security.NoSuchAlgorithmException e) {
|
||||
System.out.println(
|
||||
"Problem executing hash - TestCase java.security.MessageDigest.getInstance(java.lang.String,java.security.Provider)");
|
||||
throw new ServletException(e);
|
||||
} catch (java.security.NoSuchProviderException e) {
|
||||
System.out.println(
|
||||
"Problem executing hash - TestCase java.security.MessageDigest.getInstance(java.lang.String,java.security.Provider)");
|
||||
throw new ServletException(e);
|
||||
}
|
||||
|
||||
response.getWriter()
|
||||
.println(
|
||||
"Hash Test java.security.MessageDigest.getInstance(java.lang.String,java.security.Provider) executed");
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,67 @@
|
||||
/**
|
||||
* OWASP Benchmark v1.2
|
||||
*
|
||||
* <p>This file is part of the Open Web Application Security Project (OWASP) Benchmark Project. For
|
||||
* details, please see <a
|
||||
* href="https://owasp.org/www-project-benchmark/">https://owasp.org/www-project-benchmark/</a>.
|
||||
*
|
||||
* <p>The OWASP Benchmark is free software: you can redistribute it and/or modify it under the terms
|
||||
* of the GNU General Public License as published by the Free Software Foundation, version 2.
|
||||
*
|
||||
* <p>The OWASP Benchmark is distributed in the hope that it will be useful, but WITHOUT ANY
|
||||
* WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
|
||||
* PURPOSE. See the GNU General Public License for more details.
|
||||
*
|
||||
* @author Dave Wichers
|
||||
* @created 2015
|
||||
*/
|
||||
package org.owasp.benchmark.testcode;
|
||||
|
||||
import java.io.IOException;
|
||||
import javax.servlet.ServletException;
|
||||
import javax.servlet.annotation.WebServlet;
|
||||
import javax.servlet.http.HttpServlet;
|
||||
import javax.servlet.http.HttpServletRequest;
|
||||
import javax.servlet.http.HttpServletResponse;
|
||||
|
||||
@WebServlet(value = "/sqli-00/BenchmarkTest00052")
|
||||
public class BenchmarkTest00052 extends HttpServlet {
|
||||
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
@Override
|
||||
public void doGet(HttpServletRequest request, HttpServletResponse response)
|
||||
throws ServletException, IOException {
|
||||
doPost(request, response);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void doPost(HttpServletRequest request, HttpServletResponse response)
|
||||
throws ServletException, IOException {
|
||||
// some code
|
||||
response.setContentType("text/html;charset=UTF-8");
|
||||
|
||||
org.owasp.benchmark.helpers.SeparateClassRequest scr =
|
||||
new org.owasp.benchmark.helpers.SeparateClassRequest(request);
|
||||
String param = scr.getTheValue("BenchmarkTest00052");
|
||||
|
||||
String sql = "{call " + param + "}";
|
||||
|
||||
try {
|
||||
java.sql.Connection connection =
|
||||
org.owasp.benchmark.helpers.DatabaseHelper.getSqlConnection();
|
||||
java.sql.CallableStatement statement =
|
||||
connection.prepareCall(
|
||||
sql,
|
||||
java.sql.ResultSet.TYPE_FORWARD_ONLY,
|
||||
java.sql.ResultSet.CONCUR_READ_ONLY,
|
||||
java.sql.ResultSet.CLOSE_CURSORS_AT_COMMIT);
|
||||
java.sql.ResultSet rs = statement.executeQuery();
|
||||
org.owasp.benchmark.helpers.DatabaseHelper.printResults(rs, sql, response);
|
||||
} catch (java.sql.SQLException e) {
|
||||
if (org.owasp.benchmark.helpers.DatabaseHelper.hideSQLErrors) {
|
||||
response.getWriter().println("Error processing request.");
|
||||
} else throw new ServletException(e);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,91 @@
|
||||
/**
|
||||
* OWASP Benchmark Project v1.2
|
||||
*
|
||||
* <p>This file is part of the Open Web Application Security Project (OWASP) Benchmark Project. For
|
||||
* details, please see <a
|
||||
* href="https://owasp.org/www-project-benchmark/">https://owasp.org/www-project-benchmark/</a>.
|
||||
*
|
||||
* <p>The OWASP Benchmark is free software: you can redistribute it and/or modify it under the terms
|
||||
* of the GNU General Public License as published by the Free Software Foundation, version 2.
|
||||
*
|
||||
* <p>The OWASP Benchmark is distributed in the hope that it will be useful, but WITHOUT ANY
|
||||
* WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
|
||||
* PURPOSE. See the GNU General Public License for more details.
|
||||
*
|
||||
* @author Nick Sanidas
|
||||
* @created 2015
|
||||
*/
|
||||
package org.owasp.benchmark.testcode;
|
||||
|
||||
import java.io.IOException;
|
||||
import javax.servlet.ServletException;
|
||||
import javax.servlet.annotation.WebServlet;
|
||||
import javax.servlet.http.HttpServlet;
|
||||
import javax.servlet.http.HttpServletRequest;
|
||||
import javax.servlet.http.HttpServletResponse;
|
||||
|
||||
@WebServlet(value = "/cmdi-00/BenchmarkTest00090")
|
||||
public class BenchmarkTest00090 extends HttpServlet {
|
||||
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
@Override
|
||||
public void doGet(HttpServletRequest request, HttpServletResponse response)
|
||||
throws ServletException, IOException {
|
||||
response.setContentType("text/html;charset=UTF-8");
|
||||
javax.servlet.http.Cookie userCookie =
|
||||
new javax.servlet.http.Cookie("BenchmarkTest00090", "ls");
|
||||
userCookie.setMaxAge(60 * 3); // Store cookie for 3 minutes
|
||||
userCookie.setSecure(true);
|
||||
userCookie.setHttpOnly(true);
|
||||
userCookie.setPath(request.getRequestURI());
|
||||
userCookie.setDomain(new java.net.URL(request.getRequestURL().toString()).getHost());
|
||||
response.addCookie(userCookie);
|
||||
javax.servlet.RequestDispatcher rd =
|
||||
request.getRequestDispatcher("/cmdi-00/BenchmarkTest00090.html");
|
||||
rd.include(request, response);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void doPost(HttpServletRequest request, HttpServletResponse response)
|
||||
throws ServletException, IOException {
|
||||
response.setContentType("text/html;charset=UTF-8");
|
||||
|
||||
javax.servlet.http.Cookie[] theCookies = request.getCookies();
|
||||
|
||||
String param = "noCookieValueSupplied";
|
||||
if (theCookies != null) {
|
||||
for (javax.servlet.http.Cookie theCookie : theCookies) {
|
||||
if (theCookie.getName().equals("BenchmarkTest00090")) {
|
||||
param = java.net.URLDecoder.decode(theCookie.getValue(), "UTF-8");
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
String bar;
|
||||
|
||||
// Simple if statement that assigns constant to bar on true condition
|
||||
int num = 86;
|
||||
if ((7 * 42) - num > 200) bar = "This_should_always_happen";
|
||||
else bar = param;
|
||||
|
||||
String cmd = "";
|
||||
String osName = System.getProperty("os.name");
|
||||
if (osName.indexOf("Windows") != -1) {
|
||||
cmd = org.owasp.benchmark.helpers.Utils.getOSCommandString("echo");
|
||||
}
|
||||
|
||||
Runtime r = Runtime.getRuntime();
|
||||
|
||||
try {
|
||||
Process p = r.exec(cmd + bar);
|
||||
org.owasp.benchmark.helpers.Utils.printOSCommandResults(p, response);
|
||||
} catch (IOException e) {
|
||||
System.out.println("Problem executing cmdi - TestCase");
|
||||
response.getWriter()
|
||||
.println(org.owasp.esapi.ESAPI.encoder().encodeForHTML(e.getMessage()));
|
||||
return;
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,57 @@
|
||||
'''
|
||||
OWASP Benchmark for Python v0.1
|
||||
|
||||
This file is part of the Open Web Application Security Project (OWASP) Benchmark Project.
|
||||
For details, please see https://owasp.org/www-project-benchmark.
|
||||
|
||||
The OWASP Benchmark is free software: you can redistribute it and/or modify it under the terms
|
||||
of the GNU General Public License as published by the Free Software Foundation, version 3.
|
||||
|
||||
The OWASP Benchmark is distributed in the hope that it will be useful, but WITHOUT ANY
|
||||
WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
|
||||
PURPOSE. See the GNU General Public License for more details.
|
||||
|
||||
Author: Theo Cartsonis
|
||||
Created: 2025
|
||||
'''
|
||||
|
||||
from flask import redirect, url_for, request, make_response, render_template
|
||||
from helpers.utils import escape_for_html
|
||||
|
||||
def init(app):
|
||||
|
||||
@app.route('/benchmark/sqli-00/BenchmarkTest00011', methods=['GET'])
|
||||
def BenchmarkTest00011_get():
|
||||
response = make_response(render_template('web/sqli-00/BenchmarkTest00011.html'))
|
||||
response.set_cookie('BenchmarkTest00011', 'bar',
|
||||
max_age=60*3,
|
||||
secure=True,
|
||||
path=request.path,
|
||||
domain='localhost')
|
||||
return response
|
||||
return BenchmarkTest00011_post()
|
||||
|
||||
@app.route('/benchmark/sqli-00/BenchmarkTest00011', methods=['POST'])
|
||||
def BenchmarkTest00011_post():
|
||||
RESPONSE = ""
|
||||
|
||||
import urllib.parse
|
||||
param = urllib.parse.unquote_plus(request.cookies.get("BenchmarkTest00011", "noCookieValueSupplied"))
|
||||
|
||||
bar = "This should never happen"
|
||||
if 'should' in bar:
|
||||
bar = param
|
||||
|
||||
import helpers.db_sqlite
|
||||
|
||||
sql = f'SELECT username from USERS where password = ?'
|
||||
con = helpers.db_sqlite.get_connection()
|
||||
cur = con.cursor()
|
||||
cur.execute(sql, (bar,))
|
||||
RESPONSE += (
|
||||
helpers.db_sqlite.results(cur, sql)
|
||||
)
|
||||
con.close()
|
||||
|
||||
return RESPONSE
|
||||
|
||||
@@ -0,0 +1,76 @@
|
||||
'''
|
||||
OWASP Benchmark for Python v0.1
|
||||
|
||||
This file is part of the Open Web Application Security Project (OWASP) Benchmark Project.
|
||||
For details, please see https://owasp.org/www-project-benchmark.
|
||||
|
||||
The OWASP Benchmark is free software: you can redistribute it and/or modify it under the terms
|
||||
of the GNU General Public License as published by the Free Software Foundation, version 3.
|
||||
|
||||
The OWASP Benchmark is distributed in the hope that it will be useful, but WITHOUT ANY
|
||||
WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
|
||||
PURPOSE. See the GNU General Public License for more details.
|
||||
|
||||
Author: Theo Cartsonis
|
||||
Created: 2025
|
||||
'''
|
||||
|
||||
from flask import redirect, url_for, request, make_response, render_template
|
||||
from helpers.utils import escape_for_html
|
||||
|
||||
def init(app):
|
||||
|
||||
@app.route('/benchmark/hash-00/BenchmarkTest00054', methods=['GET'])
|
||||
def BenchmarkTest00054_get():
|
||||
response = make_response(render_template('web/hash-00/BenchmarkTest00054.html'))
|
||||
response.set_cookie('BenchmarkTest00054', 'someSecret',
|
||||
max_age=60*3,
|
||||
secure=True,
|
||||
path=request.path,
|
||||
domain='localhost')
|
||||
return response
|
||||
return BenchmarkTest00054_post()
|
||||
|
||||
@app.route('/benchmark/hash-00/BenchmarkTest00054', methods=['POST'])
|
||||
def BenchmarkTest00054_post():
|
||||
RESPONSE = ""
|
||||
|
||||
import urllib.parse
|
||||
param = urllib.parse.unquote_plus(request.cookies.get("BenchmarkTest00054", "noCookieValueSupplied"))
|
||||
|
||||
string26833 = ''
|
||||
data12 = ''
|
||||
copy = string26833
|
||||
string26833 = ''
|
||||
string26833 += param
|
||||
copy += 'SomeOKString'
|
||||
bar = copy
|
||||
|
||||
import hashlib, base64
|
||||
import io, helpers.utils
|
||||
|
||||
input = ''
|
||||
if isinstance(bar, str):
|
||||
input = bar.encode('utf-8')
|
||||
elif isinstance(bar, io.IOBase):
|
||||
input = bar.read(1000)
|
||||
|
||||
if len(input) == 0:
|
||||
RESPONSE += (
|
||||
'Cannot generate hash: Input was empty.'
|
||||
)
|
||||
return RESPONSE
|
||||
|
||||
hash = hashlib.new('md5')
|
||||
hash.update(input)
|
||||
|
||||
result = hash.digest()
|
||||
f = open(f'{helpers.utils.TESTFILES_DIR}/passwordFile.txt', 'a')
|
||||
f.write(f'hash_value={base64.b64encode(result)}\n')
|
||||
RESPONSE += (
|
||||
f'Sensitive value \'{helpers.utils.escape_for_html(input.decode('utf-8'))}\' hashed and stored.'
|
||||
)
|
||||
f.close()
|
||||
|
||||
return RESPONSE
|
||||
|
||||
@@ -0,0 +1,72 @@
|
||||
'''
|
||||
OWASP Benchmark for Python v0.1
|
||||
|
||||
This file is part of the Open Web Application Security Project (OWASP) Benchmark Project.
|
||||
For details, please see https://owasp.org/www-project-benchmark.
|
||||
|
||||
The OWASP Benchmark is free software: you can redistribute it and/or modify it under the terms
|
||||
of the GNU General Public License as published by the Free Software Foundation, version 3.
|
||||
|
||||
The OWASP Benchmark is distributed in the hope that it will be useful, but WITHOUT ANY
|
||||
WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
|
||||
PURPOSE. See the GNU General Public License for more details.
|
||||
|
||||
Author: Theo Cartsonis
|
||||
Created: 2025
|
||||
'''
|
||||
|
||||
from flask import redirect, url_for, request, make_response, render_template
|
||||
from helpers.utils import escape_for_html
|
||||
|
||||
def init(app):
|
||||
|
||||
@app.route('/benchmark/hash-00/BenchmarkTest00055', methods=['GET'])
|
||||
def BenchmarkTest00055_get():
|
||||
response = make_response(render_template('web/hash-00/BenchmarkTest00055.html'))
|
||||
response.set_cookie('BenchmarkTest00055', 'someSecret',
|
||||
max_age=60*3,
|
||||
secure=True,
|
||||
path=request.path,
|
||||
domain='localhost')
|
||||
return response
|
||||
return BenchmarkTest00055_post()
|
||||
|
||||
@app.route('/benchmark/hash-00/BenchmarkTest00055', methods=['POST'])
|
||||
def BenchmarkTest00055_post():
|
||||
RESPONSE = ""
|
||||
|
||||
import urllib.parse
|
||||
param = urllib.parse.unquote_plus(request.cookies.get("BenchmarkTest00055", "noCookieValueSupplied"))
|
||||
|
||||
num = 106
|
||||
|
||||
bar = "This should never happen" if (7*42) - num > 200 else param
|
||||
|
||||
import hashlib, base64
|
||||
import io, helpers.utils
|
||||
|
||||
input = ''
|
||||
if isinstance(bar, str):
|
||||
input = bar.encode('utf-8')
|
||||
elif isinstance(bar, io.IOBase):
|
||||
input = bar.read(1000)
|
||||
|
||||
if len(input) == 0:
|
||||
RESPONSE += (
|
||||
'Cannot generate hash: Input was empty.'
|
||||
)
|
||||
return RESPONSE
|
||||
|
||||
hash = hashlib.new('sha384')
|
||||
hash.update(input)
|
||||
|
||||
result = hash.digest()
|
||||
f = open(f'{helpers.utils.TESTFILES_DIR}/passwordFile.txt', 'a')
|
||||
f.write(f'hash_value={base64.b64encode(result)}\n')
|
||||
RESPONSE += (
|
||||
f'Sensitive value \'{helpers.utils.escape_for_html(input.decode('utf-8'))}\' hashed and stored.'
|
||||
)
|
||||
f.close()
|
||||
|
||||
return RESPONSE
|
||||
|
||||
@@ -0,0 +1,62 @@
|
||||
'''
|
||||
OWASP Benchmark for Python v0.1
|
||||
|
||||
This file is part of the Open Web Application Security Project (OWASP) Benchmark Project.
|
||||
For details, please see https://owasp.org/www-project-benchmark.
|
||||
|
||||
The OWASP Benchmark is free software: you can redistribute it and/or modify it under the terms
|
||||
of the GNU General Public License as published by the Free Software Foundation, version 3.
|
||||
|
||||
The OWASP Benchmark is distributed in the hope that it will be useful, but WITHOUT ANY
|
||||
WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
|
||||
PURPOSE. See the GNU General Public License for more details.
|
||||
|
||||
Author: Theo Cartsonis
|
||||
Created: 2025
|
||||
'''
|
||||
|
||||
from flask import redirect, url_for, request, make_response, render_template
|
||||
from helpers.utils import escape_for_html
|
||||
|
||||
def init(app):
|
||||
|
||||
@app.route('/benchmark/codeinj-00/BenchmarkTest00073', methods=['GET'])
|
||||
def BenchmarkTest00073_get():
|
||||
response = make_response(render_template('web/codeinj-00/BenchmarkTest00073.html'))
|
||||
response.set_cookie('BenchmarkTest00073', '%27ECHOOO%27',
|
||||
max_age=60*3,
|
||||
secure=True,
|
||||
path=request.path,
|
||||
domain='localhost')
|
||||
return response
|
||||
return BenchmarkTest00073_post()
|
||||
|
||||
@app.route('/benchmark/codeinj-00/BenchmarkTest00073', methods=['POST'])
|
||||
def BenchmarkTest00073_post():
|
||||
RESPONSE = ""
|
||||
|
||||
import urllib.parse
|
||||
param = urllib.parse.unquote_plus(request.cookies.get("BenchmarkTest00073", "noCookieValueSupplied"))
|
||||
|
||||
string41416 = 'help'
|
||||
string41416 += param
|
||||
string41416 += 'snapes on a plane'
|
||||
bar = string41416[4:-17]
|
||||
|
||||
if not bar.startswith('\'') or not bar.endswith('\'') or '\'' in bar[1:-1]:
|
||||
RESPONSE += (
|
||||
"Eval argument must be a plain string literal."
|
||||
)
|
||||
return RESPONSE
|
||||
|
||||
try:
|
||||
RESPONSE += (
|
||||
eval(bar)
|
||||
)
|
||||
except:
|
||||
RESPONSE += (
|
||||
f'Error evaluating expression \'{escape_for_html(bar)}\''
|
||||
)
|
||||
|
||||
return RESPONSE
|
||||
|
||||
@@ -0,0 +1,58 @@
|
||||
'''
|
||||
OWASP Benchmark for Python v0.1
|
||||
|
||||
This file is part of the Open Web Application Security Project (OWASP) Benchmark Project.
|
||||
For details, please see https://owasp.org/www-project-benchmark.
|
||||
|
||||
The OWASP Benchmark is free software: you can redistribute it and/or modify it under the terms
|
||||
of the GNU General Public License as published by the Free Software Foundation, version 3.
|
||||
|
||||
The OWASP Benchmark is distributed in the hope that it will be useful, but WITHOUT ANY
|
||||
WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
|
||||
PURPOSE. See the GNU General Public License for more details.
|
||||
|
||||
Author: Theo Cartsonis
|
||||
Created: 2025
|
||||
'''
|
||||
|
||||
from flask import redirect, url_for, request, make_response, render_template
|
||||
from helpers.utils import escape_for_html
|
||||
|
||||
def init(app):
|
||||
|
||||
@app.route('/benchmark/codeinj-00/BenchmarkTest00074', methods=['GET'])
|
||||
def BenchmarkTest00074_get():
|
||||
response = make_response(render_template('web/codeinj-00/BenchmarkTest00074.html'))
|
||||
response.set_cookie('BenchmarkTest00074', '%27RESPONSE+%2B%3D+%5C%27ECHOOO%5C%27%27',
|
||||
max_age=60*3,
|
||||
secure=True,
|
||||
path=request.path,
|
||||
domain='localhost')
|
||||
return response
|
||||
return BenchmarkTest00074_post()
|
||||
|
||||
@app.route('/benchmark/codeinj-00/BenchmarkTest00074', methods=['POST'])
|
||||
def BenchmarkTest00074_post():
|
||||
RESPONSE = ""
|
||||
|
||||
import urllib.parse
|
||||
param = urllib.parse.unquote_plus(request.cookies.get("BenchmarkTest00074", "noCookieValueSupplied"))
|
||||
|
||||
import configparser
|
||||
|
||||
bar = 'safe!'
|
||||
conf90091 = configparser.ConfigParser()
|
||||
conf90091.add_section('section90091')
|
||||
conf90091.set('section90091', 'keyA-90091', 'a-Value')
|
||||
conf90091.set('section90091', 'keyB-90091', param)
|
||||
bar = conf90091.get('section90091', 'keyB-90091')
|
||||
|
||||
try:
|
||||
exec(bar)
|
||||
except:
|
||||
RESPONSE += (
|
||||
f'Error executing statement \'{escape_for_html(bar)}\''
|
||||
)
|
||||
|
||||
return RESPONSE
|
||||
|
||||
@@ -0,0 +1,65 @@
|
||||
'''
|
||||
OWASP Benchmark for Python v0.1
|
||||
|
||||
This file is part of the Open Web Application Security Project (OWASP) Benchmark Project.
|
||||
For details, please see https://owasp.org/www-project-benchmark.
|
||||
|
||||
The OWASP Benchmark is free software: you can redistribute it and/or modify it under the terms
|
||||
of the GNU General Public License as published by the Free Software Foundation, version 3.
|
||||
|
||||
The OWASP Benchmark is distributed in the hope that it will be useful, but WITHOUT ANY
|
||||
WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
|
||||
PURPOSE. See the GNU General Public License for more details.
|
||||
|
||||
Author: Theo Cartsonis
|
||||
Created: 2025
|
||||
'''
|
||||
|
||||
from flask import redirect, url_for, request, make_response, render_template
|
||||
from helpers.utils import escape_for_html
|
||||
|
||||
def init(app):
|
||||
|
||||
@app.route('/benchmark/deserialization-00/BenchmarkTest00078', methods=['GET'])
|
||||
def BenchmarkTest00078_get():
|
||||
response = make_response(render_template('web/deserialization-00/BenchmarkTest00078.html'))
|
||||
response.set_cookie('BenchmarkTest00078', 'gASVNwAAAAAAAACMCF9fbWFpbl9flIwOc2FmZV90b19waWNrbGWUk5QpgZR9lCiMAWGUjANmb2-UjAFilEtjdWIu',
|
||||
max_age=60*3,
|
||||
secure=True,
|
||||
path=request.path,
|
||||
domain='localhost')
|
||||
return response
|
||||
return BenchmarkTest00078_post()
|
||||
|
||||
@app.route('/benchmark/deserialization-00/BenchmarkTest00078', methods=['POST'])
|
||||
def BenchmarkTest00078_post():
|
||||
RESPONSE = ""
|
||||
|
||||
import urllib.parse
|
||||
param = urllib.parse.unquote_plus(request.cookies.get("BenchmarkTest00078", "noCookieValueSupplied"))
|
||||
|
||||
string9895 = 'help'
|
||||
string9895 += param
|
||||
string9895 += 'snapes on a plane'
|
||||
bar = string9895[4:-17]
|
||||
|
||||
import pickle
|
||||
import base64
|
||||
import helpers.utils
|
||||
|
||||
helpers.utils.sharedstr = "no pickles to be seen here"
|
||||
|
||||
try:
|
||||
unpickled = pickle.loads(base64.urlsafe_b64decode(bar))
|
||||
except:
|
||||
RESPONSE += (
|
||||
'Unpickling failed!'
|
||||
)
|
||||
return RESPONSE
|
||||
|
||||
RESPONSE += (
|
||||
f'shared string is {helpers.utils.sharedstr}'
|
||||
)
|
||||
|
||||
return RESPONSE
|
||||
|
||||
@@ -0,0 +1,57 @@
|
||||
'''
|
||||
OWASP Benchmark for Python v0.1
|
||||
|
||||
This file is part of the Open Web Application Security Project (OWASP) Benchmark Project.
|
||||
For details, please see https://owasp.org/www-project-benchmark.
|
||||
|
||||
The OWASP Benchmark is free software: you can redistribute it and/or modify it under the terms
|
||||
of the GNU General Public License as published by the Free Software Foundation, version 3.
|
||||
|
||||
The OWASP Benchmark is distributed in the hope that it will be useful, but WITHOUT ANY
|
||||
WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
|
||||
PURPOSE. See the GNU General Public License for more details.
|
||||
|
||||
Author: Theo Cartsonis
|
||||
Created: 2025
|
||||
'''
|
||||
|
||||
from flask import redirect, url_for, request, make_response, render_template
|
||||
from helpers.utils import escape_for_html
|
||||
|
||||
def init(app):
|
||||
|
||||
@app.route('/benchmark/deserialization-00/BenchmarkTest00079', methods=['GET'])
|
||||
def BenchmarkTest00079_get():
|
||||
response = make_response(render_template('web/deserialization-00/BenchmarkTest00079.html'))
|
||||
response.set_cookie('BenchmarkTest00079', 'name%3A+safe+data%0Atext%3A+act+like+this+is+conf+data',
|
||||
max_age=60*3,
|
||||
secure=True,
|
||||
path=request.path,
|
||||
domain='localhost')
|
||||
return response
|
||||
return BenchmarkTest00079_post()
|
||||
|
||||
@app.route('/benchmark/deserialization-00/BenchmarkTest00079', methods=['POST'])
|
||||
def BenchmarkTest00079_post():
|
||||
RESPONSE = ""
|
||||
|
||||
import urllib.parse
|
||||
param = urllib.parse.unquote_plus(request.cookies.get("BenchmarkTest00079", "noCookieValueSupplied"))
|
||||
|
||||
bar = param
|
||||
|
||||
import yaml
|
||||
|
||||
try:
|
||||
yobj = yaml.safe_load(bar)
|
||||
|
||||
RESPONSE += (
|
||||
yobj['text']
|
||||
)
|
||||
except:
|
||||
RESPONSE += (
|
||||
"There was an error loading the configuration"
|
||||
)
|
||||
|
||||
return RESPONSE
|
||||
|
||||
@@ -0,0 +1,56 @@
|
||||
'''
|
||||
OWASP Benchmark for Python v0.1
|
||||
|
||||
This file is part of the Open Web Application Security Project (OWASP) Benchmark Project.
|
||||
For details, please see https://owasp.org/www-project-benchmark.
|
||||
|
||||
The OWASP Benchmark is free software: you can redistribute it and/or modify it under the terms
|
||||
of the GNU General Public License as published by the Free Software Foundation, version 3.
|
||||
|
||||
The OWASP Benchmark is distributed in the hope that it will be useful, but WITHOUT ANY
|
||||
WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
|
||||
PURPOSE. See the GNU General Public License for more details.
|
||||
|
||||
Author: Theo Cartsonis
|
||||
Created: 2025
|
||||
'''
|
||||
|
||||
from flask import redirect, url_for, request, make_response, render_template
|
||||
from helpers.utils import escape_for_html
|
||||
|
||||
def init(app):
|
||||
|
||||
@app.route('/benchmark/sqli-00/BenchmarkTest00099', methods=['GET'])
|
||||
def BenchmarkTest00099_get():
|
||||
return BenchmarkTest00099_post()
|
||||
|
||||
@app.route('/benchmark/sqli-00/BenchmarkTest00099', methods=['POST'])
|
||||
def BenchmarkTest00099_post():
|
||||
RESPONSE = ""
|
||||
|
||||
param = request.form.get("BenchmarkTest00099")
|
||||
if not param:
|
||||
param = ""
|
||||
|
||||
import configparser
|
||||
|
||||
bar = 'safe!'
|
||||
conf52528 = configparser.ConfigParser()
|
||||
conf52528.add_section('section52528')
|
||||
conf52528.set('section52528', 'keyA-52528', 'a-Value')
|
||||
conf52528.set('section52528', 'keyB-52528', param)
|
||||
bar = conf52528.get('section52528', 'keyB-52528')
|
||||
|
||||
import helpers.db_sqlite
|
||||
|
||||
sql = f'SELECT username from USERS where password = \'{bar}\''
|
||||
con = helpers.db_sqlite.get_connection()
|
||||
cur = con.cursor()
|
||||
cur.execute(sql)
|
||||
RESPONSE += (
|
||||
helpers.db_sqlite.results(cur, sql)
|
||||
)
|
||||
con.close()
|
||||
|
||||
return RESPONSE
|
||||
|
||||
@@ -0,0 +1,63 @@
|
||||
'''
|
||||
OWASP Benchmark for Python v0.1
|
||||
|
||||
This file is part of the Open Web Application Security Project (OWASP) Benchmark Project.
|
||||
For details, please see https://owasp.org/www-project-benchmark.
|
||||
|
||||
The OWASP Benchmark is free software: you can redistribute it and/or modify it under the terms
|
||||
of the GNU General Public License as published by the Free Software Foundation, version 3.
|
||||
|
||||
The OWASP Benchmark is distributed in the hope that it will be useful, but WITHOUT ANY
|
||||
WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
|
||||
PURPOSE. See the GNU General Public License for more details.
|
||||
|
||||
Author: Theo Cartsonis
|
||||
Created: 2025
|
||||
'''
|
||||
|
||||
from flask import redirect, url_for, request, make_response, render_template
|
||||
from helpers.utils import escape_for_html
|
||||
|
||||
def init(app):
|
||||
|
||||
@app.route('/benchmark/cmdi-00/BenchmarkTest00165', methods=['GET'])
|
||||
def BenchmarkTest00165_get():
|
||||
return BenchmarkTest00165_post()
|
||||
|
||||
@app.route('/benchmark/cmdi-00/BenchmarkTest00165', methods=['POST'])
|
||||
def BenchmarkTest00165_post():
|
||||
RESPONSE = ""
|
||||
|
||||
param = request.form.get("BenchmarkTest00165")
|
||||
if not param:
|
||||
param = ""
|
||||
|
||||
bar = ""
|
||||
if param:
|
||||
lst = []
|
||||
lst.append('safe')
|
||||
lst.append(param)
|
||||
lst.append('moresafe')
|
||||
lst.pop(0)
|
||||
bar = lst[0]
|
||||
|
||||
import os
|
||||
import subprocess
|
||||
import helpers.utils
|
||||
|
||||
argList = []
|
||||
if "Windows" in os.name:
|
||||
argList.append("cmd.exe")
|
||||
argList.append("-c")
|
||||
else:
|
||||
argList.append("sh")
|
||||
argList.append("-c")
|
||||
argList.append(f"echo {bar}")
|
||||
|
||||
proc = subprocess.run(argList, capture_output=True, encoding="utf-8")
|
||||
RESPONSE += (
|
||||
helpers.utils.commandOutput(proc)
|
||||
)
|
||||
|
||||
return RESPONSE
|
||||
|
||||
@@ -0,0 +1,69 @@
|
||||
'''
|
||||
OWASP Benchmark for Python v0.1
|
||||
|
||||
This file is part of the Open Web Application Security Project (OWASP) Benchmark Project.
|
||||
For details, please see https://owasp.org/www-project-benchmark.
|
||||
|
||||
The OWASP Benchmark is free software: you can redistribute it and/or modify it under the terms
|
||||
of the GNU General Public License as published by the Free Software Foundation, version 3.
|
||||
|
||||
The OWASP Benchmark is distributed in the hope that it will be useful, but WITHOUT ANY
|
||||
WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
|
||||
PURPOSE. See the GNU General Public License for more details.
|
||||
|
||||
Author: Theo Cartsonis
|
||||
Created: 2025
|
||||
'''
|
||||
|
||||
from flask import redirect, url_for, request, make_response, render_template
|
||||
from helpers.utils import escape_for_html
|
||||
|
||||
def init(app):
|
||||
|
||||
@app.route('/benchmark/cmdi-00/BenchmarkTest00350', methods=['GET'])
|
||||
def BenchmarkTest00350_get():
|
||||
return BenchmarkTest00350_post()
|
||||
|
||||
@app.route('/benchmark/cmdi-00/BenchmarkTest00350', methods=['POST'])
|
||||
def BenchmarkTest00350_post():
|
||||
RESPONSE = ""
|
||||
|
||||
import helpers.separate_request
|
||||
|
||||
wrapped = helpers.separate_request.request_wrapper(request)
|
||||
param = wrapped.get_form_parameter("BenchmarkTest00350")
|
||||
if not param:
|
||||
param = ""
|
||||
|
||||
map11630 = {}
|
||||
map11630['keyA-11630'] = 'a-Value'
|
||||
map11630['keyB-11630'] = param
|
||||
map11630['keyC'] = 'another-Value'
|
||||
bar = "safe!"
|
||||
bar = map11630['keyB-11630']
|
||||
bar = map11630['keyA-11630']
|
||||
|
||||
import platform
|
||||
import subprocess
|
||||
import helpers.utils
|
||||
|
||||
argStr = ""
|
||||
if platform.system() == "Windows":
|
||||
argStr = "cmd.exe /c "
|
||||
else:
|
||||
argStr = "sh -c "
|
||||
argStr += f"echo {bar}"
|
||||
|
||||
try:
|
||||
proc = subprocess.run(argStr, shell=True, capture_output=True, encoding="utf-8")
|
||||
|
||||
RESPONSE += (
|
||||
helpers.utils.commandOutput(proc)
|
||||
)
|
||||
except IOError:
|
||||
RESPONSE += (
|
||||
"Problem executing cmdi - subprocess.run(list) Test Case"
|
||||
)
|
||||
|
||||
return RESPONSE
|
||||
|
||||
Reference in New Issue
Block a user