Skip to content

Conversation

@Chocapikk
Copy link
Contributor

@Chocapikk Chocapikk commented Nov 19, 2025

Adds support for GHSA (GitHub Security Advisory) and OSV (Open Source Vulnerabilities) references in Metasploit modules. Modules can now use structured reference formats instead of full URLs.

GHSA Support

The format depends on whether the GHSA is available globally or repository-specific:

  • Global format: ['GHSA', 'xxxx-xxxx-xxxx'] => https://github.com/advisories/GHSA-xxxx-xxxx-xxxx
  • Repository-specific format: ['GHSA', 'xxxx-xxxx-xxxx', 'owner/repo'] => https://github.com/owner/repo/security/advisories/GHSA-xxxx-xxxx-xxxx

OSV Support

OSV (Open Source Vulnerabilities) is a modern vulnerability database created by Google that aggregates 15+ sources and covers 25+ ecosystems (Go, Python, npm, Maven, RubyGems, GitHub advisories, and more). It provides a unified format for open source vulnerabilities.

  • Format: ['OSV', 'ECOSYSTEM-YEAR-ID'] => https://osv.dev/vulnerability/ECOSYSTEM-YEAR-ID
  • Examples: ['OSV', 'GO-2021-0113'], ['OSV', 'PYSEC-2024-123'], ['OSV', 'GHSA-8c52-x9w7-vc95']
  • Supports all OSV formats including ecosystem-specific IDs (GO-, PYSEC-, GHSA-, MINI-, etc.)

This PR also:

  • Updates existing modules to use the correct repository-specific format where needed, ensuring all GHSA references are accessible and properly linked
  • Fixes a bug with nested array structures in module references that could cause TypeError
  • Adds validation to prevent nested arrays in references (fixing a 20-year-old bug in the core)
  • Adds string conversion safety for reference initialization (handles ATT&CK constants and edge cases)

@Chocapikk Chocapikk force-pushed the add-ghsa-reference-support branch 2 times, most recently from 8e18745 to 0fb2d09 Compare November 19, 2025 23:42
@Chocapikk Chocapikk force-pushed the add-ghsa-reference-support branch from 0fb2d09 to f098069 Compare November 19, 2025 23:43
@Chocapikk Chocapikk force-pushed the add-ghsa-reference-support branch from 7ad0e36 to 5bee4a1 Compare November 20, 2025 00:07
@Chocapikk Chocapikk changed the title Add GHSA reference type support Add GHSA and OSV reference type support Nov 20, 2025
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.

1 participant