Skip to content

feat: add CVE rules#457

Open
NY1024 wants to merge 2 commits into
Tencent:mainfrom
NY1024:add-cve-rules-for-jan-localai
Open

feat: add CVE rules#457
NY1024 wants to merge 2 commits into
Tencent:mainfrom
NY1024:add-cve-rules-for-jan-localai

Conversation

@NY1024

@NY1024 NY1024 commented Jul 3, 2026

Copy link
Copy Markdown
Contributor

Add vulnerability detection rules for two AI components that previously had fingerprints but no corresponding CVE rules:

  • Jan CVE-2024-36857: Arbitrary file read via /v1/app/readFileSync (CVSS 7.5, HIGH)
  • Jan CVE-2024-36858: Arbitrary file upload RCE via /v1/app/writeFileSync (CVSS 9.8, CRITICAL)
  • LocalAI CVE-2024-3135: Cross-Site Request Forgery (CSRF) (CVSS 3.0, LOW)

All rules include both Chinese (data/vuln/) and English (data/vuln_en/) versions. CVSS scores and descriptions are sourced from NVD API. All YAML files pass yamlcheck validation.

…lAI (CVE-2024-3135)

Add vulnerability detection rules for two AI components that previously
had fingerprints but no corresponding CVE rules:

- Jan CVE-2024-36857: Arbitrary file read via /v1/app/readFileSync (CVSS 7.5, HIGH)
- Jan CVE-2024-36858: Arbitrary file upload RCE via /v1/app/writeFileSync (CVSS 9.8, CRITICAL)
- LocalAI CVE-2024-3135: Cross-Site Request Forgery (CSRF) (CVSS 3.0, LOW)

All rules include both Chinese (data/vuln/) and English (data/vuln_en/) versions.
CVSS scores and descriptions are sourced from NVD API.
All YAML files pass yamlcheck validation.
@boy-hack

boy-hack commented Jul 6, 2026

Copy link
Copy Markdown
Collaborator

Code Review: feat: add CVE rules (Jan + LocalAI)

✅ Strengths

  • Rules cover both data/vuln/ (CN) and data/vuln_en/ (EN) — bilingual parity maintained
  • CVSS scores and severity levels are accurate
  • rule: version <= "..." fields are correctly formatted

⚠️ Conflict / Duplicate Warning

data/vuln/jan/CVE-2024-36858.yaml and data/vuln_en/jan/CVE-2024-36858.yaml are also being added by PR #462.

The same file is added by two different PRs with slightly different content:

Whichever PR merges second will conflict. Please coordinate with @NY1024 to deduplicate — suggest keeping one canonical version before merge.

Minor Notes

  • CVE-2024-36857 (arbitrary file read via readFileSync): looks correct, CVSS 7.5 HIGH ✅
  • CVE-2024-3135 (LocalAI CSRF): CVSS 3.0 LOW — note LocalAI fingerprint must exist for this rule to trigger; confirmed present in data/fingerprints/localai.yaml

🟡 Verdict

LGTM with the caveat: resolve the duplicate jan/CVE-2024-36858 conflict with PR #462 first.

NY1024 added a commit to NY1024/AI-Infra-Guard that referenced this pull request Jul 6, 2026
Per code review feedback, removing Jan CVE rules from this PR.
PR Tencent#457 (add-cve-rules-for-jan-localai) will handle Jan CVEs instead.
This avoids merge conflicts between the two PRs.
- Change rule from 'version <= 0.4.12' to 'version > 0 && version < 0.5.2'
  to correctly cover all affected versions (0.4.13-0.5.1 were also vulnerable)
- Add GHSA-qfjh-mvq6-c5p8 advisory reference
@NY1024

NY1024 commented Jul 6, 2026

Copy link
Copy Markdown
Contributor Author

Thanks for the review! The duplicate Jan/CVE-2024-36858 conflict with PR #462 has been resolved:

  • Jan files removed from PR Add CVE rules for Jan and Open WebUI components #462 — the canonical Jan rules now live exclusively in this PR (feat: add CVE rules #457)
  • Version range fixed — updated from version <= "0.4.12" to version > "0" && version < "0.5.2" to cover all affected versions (0.4.13–0.5.1 were missing from the original range)
  • GHSA reference added — included https://github.com/advisories/GHSA-qfjh-mvq6-c5p8

Other notes confirmed:

  • CVE-2024-36857 (arbitrary file read, CVSS 7.5 HIGH): ✅ correct
  • CVE-2024-3135 (LocalAI CSRF, CVSS 3.0 LOW): ✅ data/fingerprints/localai.yaml exists in upstream, rule will trigger correctly

Ready for merge.

@NY1024

NY1024 commented Jul 8, 2026

Copy link
Copy Markdown
Contributor Author

The Jan duplicate with PR #462 has been resolved. PR #462 removed its Jan files (commit 6e68c2f), so this PR is the single source for Jan CVE rules. Also fixed the version range for CVE-2024-36858 from version <= "0.4.12" to version > "0" && version < "0.5.2" (commit cc86077). No conflict remains. Ready for merge.

@NY1024

NY1024 commented Jul 8, 2026

Copy link
Copy Markdown
Contributor Author

Code Review: feat: add CVE rules (Jan + LocalAI)

✅ Strengths

  • Rules cover both data/vuln/ (CN) and data/vuln_en/ (EN) — bilingual parity maintained
  • CVSS scores and severity levels are accurate
  • rule: version <= "..." fields are correctly formatted

⚠️ Conflict / Duplicate Warning

data/vuln/jan/CVE-2024-36858.yaml and data/vuln_en/jan/CVE-2024-36858.yaml are also being added by PR #462.

The same file is added by two different PRs with slightly different content:

Whichever PR merges second will conflict. Please coordinate with @NY1024 to deduplicate — suggest keeping one canonical version before merge.

Minor Notes

  • CVE-2024-36857 (arbitrary file read via readFileSync): looks correct, CVSS 7.5 HIGH ✅
  • CVE-2024-3135 (LocalAI CSRF): CVSS 3.0 LOW — note LocalAI fingerprint must exist for this rule to trigger; confirmed present in data/fingerprints/localai.yaml

🟡 Verdict

LGTM with the caveat: resolve the duplicate jan/CVE-2024-36858 conflict with PR #462 first.

The Jan duplicate with PR #462 has been resolved. PR #462 removed its Jan files (commit 6e68c2f), so this PR is the single source for Jan CVE rules. Also fixed the version range for CVE-2024-36858 from version <= "0.4.12" to version > "0" && version < "0.5.2" (commit cc86077). No conflict remains. Ready for merge.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants