{"openapi":"3.1.0","info":{"title":"ExploitBin public API","version":"1.0.0","description":"Read-only exploit database. Search by name or CVE and download attributed original source files. No authentication required."},"servers":[{"url":"https://exploitbin.com"}],"paths":{"/api/v1/exploits":{"get":{"operationId":"searchExploits","summary":"Search exploit files","parameters":[{"name":"q","in":"query","description":"Search name, CVE, product, author and description","schema":{"type":"string"}},{"name":"cve","in":"query","description":"Exact CVE ID","schema":{"type":"string"}},{"name":"source","in":"query","description":"Upstream source","schema":{"type":"string","enum":["exploit-db","metasploit"]}},{"name":"platform","in":"query","description":"Exact platform value","schema":{"type":"string"}},{"name":"type","in":"query","description":"Exact exploit type","schema":{"type":"string"}},{"name":"sort","in":"query","description":"Ordering","schema":{"type":"string","enum":["relevance","newest","oldest","name"]}},{"name":"limit","in":"query","description":"Page size","schema":{"type":"integer","minimum":1,"maximum":100,"default":30}},{"name":"cursor","in":"query","description":"Opaque cursor; retain filters and sort","schema":{"type":"string"}}],"responses":{"200":{"description":"Matching files and stable pagination","content":{"application/json":{"schema":{"type":"object","required":["data","total","limit","nextCursor"],"properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/Exploit"}},"total":{"type":"integer"},"limit":{"type":"integer"},"nextCursor":{"type":["string","null"]}}}}}},"400":{"description":"Invalid input or ambiguous exact name","content":{"application/json":{"schema":{"type":"object"}}}},"404":{"description":"Record not found","content":{"application/json":{"schema":{"type":"object"}}}},"503":{"description":"Upstream source temporarily unavailable","content":{"application/json":{"schema":{"type":"object"}}}}}}},"/api/v1/exploits/{id}":{"get":{"operationId":"getExploit","summary":"Read metadata","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"},"description":"ExploitBin ID returned by search"}],"responses":{"200":{"description":"Attributed exploit metadata","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Exploit"}}}},"400":{"description":"Invalid input or ambiguous exact name","content":{"application/json":{"schema":{"type":"object"}}}},"404":{"description":"Record not found","content":{"application/json":{"schema":{"type":"object"}}}},"503":{"description":"Upstream source temporarily unavailable","content":{"application/json":{"schema":{"type":"object"}}}}}}},"/api/v1/exploits/{id}/code":{"get":{"operationId":"getExploitCode","summary":"Read source text and hash","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"},"description":"ExploitBin ID returned by search"}],"responses":{"200":{"description":"Original source decoded as UTF-8 for display, SHA-256, byte count, retrieval time and metadata. Downloads preserve exact bytes.","content":{"application/json":{"schema":{"type":"object","required":["exploit","code","sha256","bytes","fetchedAt","encoding"],"properties":{"exploit":{"$ref":"#/components/schemas/Exploit"},"code":{"type":"string"},"sha256":{"type":"string","pattern":"^[a-f0-9]{64}$"},"bytes":{"type":"integer"},"fetchedAt":{"type":"string","format":"date-time"},"encoding":{"type":"string"}}}}}},"400":{"description":"Invalid input or ambiguous exact name","content":{"application/json":{"schema":{"type":"object"}}}},"404":{"description":"Record not found","content":{"application/json":{"schema":{"type":"object"}}}},"503":{"description":"Upstream source temporarily unavailable","content":{"application/json":{"schema":{"type":"object"}}}}}}},"/api/v1/exploits/{id}/download":{"get":{"operationId":"downloadExploit","summary":"Download original bytes","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"},"description":"ExploitBin ID returned by search"},{"name":"If-None-Match","in":"header","schema":{"type":"string"}}],"responses":{"200":{"description":"Original source bytes, delivered as attachment","headers":{"Content-Disposition":{"schema":{"type":"string"}},"X-Content-SHA256":{"schema":{"type":"string"}},"ETag":{"schema":{"type":"string"}},"X-ExploitBin-Source":{"schema":{"type":"string","format":"uri"}},"Link":{"schema":{"type":"string"}}},"content":{"text/plain":{"schema":{"type":"string","format":"binary"}}}},"304":{"description":"Unchanged file"},"400":{"description":"Invalid input or ambiguous exact name","content":{"application/json":{"schema":{"type":"object"}}}},"404":{"description":"Record not found","content":{"application/json":{"schema":{"type":"object"}}}},"503":{"description":"Upstream source temporarily unavailable","content":{"application/json":{"schema":{"type":"object"}}}}}}},"/api/v1/download":{"get":{"operationId":"downloadByName","summary":"Download by exact name or ID","description":"Uses an exact case-insensitive name or ID. Ambiguous names return 400. This HTTP convenience route returns an attachment; MCP clients search then call download_exploit by ID.","parameters":[{"name":"name","in":"query","description":"Exact name or ID","schema":{"type":"string"},"required":true}],"responses":{"200":{"description":"Original source bytes, delivered as attachment","headers":{"Content-Disposition":{"schema":{"type":"string"}},"X-Content-SHA256":{"schema":{"type":"string"}},"ETag":{"schema":{"type":"string"}},"X-ExploitBin-Source":{"schema":{"type":"string","format":"uri"}},"Link":{"schema":{"type":"string"}}},"content":{"text/plain":{"schema":{"type":"string","format":"binary"}}}},"304":{"description":"Unchanged file"},"400":{"description":"Invalid input or ambiguous exact name","content":{"application/json":{"schema":{"type":"object"}}}},"404":{"description":"Record not found","content":{"application/json":{"schema":{"type":"object"}}}},"503":{"description":"Upstream source temporarily unavailable","content":{"application/json":{"schema":{"type":"object"}}}}}}},"/api/v1/stats":{"get":{"operationId":"getStats","summary":"Read database totals and sync status","responses":{"200":{"description":"Totals and upstream synchronization state","content":{"application/json":{"schema":{"type":"object"}}}}}}},"/api/v1/status":{"get":{"operationId":"getStatus","summary":"Alias of database totals and sync status","responses":{"200":{"description":"Same response as /api/v1/stats","content":{"application/json":{"schema":{"type":"object"}}}}}}}},"components":{"schemas":{"CveDetails":{"type":"object","required":["id","state","title","description","cvss","stale","error"],"properties":{"id":{"type":"string"},"state":{"type":"string"},"title":{"type":["string","null"]},"titleSource":{"type":["string","null"]},"description":{"type":["string","null"]},"descriptionSource":{"type":["string","null"]},"descriptionUrl":{"type":["string","null"]},"updatedAt":{"type":["string","null"]},"retrievedAt":{"type":["string","null"]},"stale":{"type":"boolean"},"error":{"type":["string","null"]},"cvss":{"anyOf":[{"type":"null"},{"$ref":"#/components/schemas/Cvss"}]}}},"Cvss":{"type":"object","required":["version","baseScore","severity","vectorString","source","sourceUrl"],"properties":{"version":{"type":"string","enum":["4.0","3.1","3.0","2.0"]},"baseScore":{"type":"number","minimum":0,"maximum":10},"severity":{"type":"string","enum":["critical","high","medium","low","none"]},"vectorString":{"type":"string"},"source":{"type":"string"},"sourceUrl":{"type":"string","format":"uri"}}},"Exploit":{"type":"object","required":["id","name","description","cves","author","source","sourceUrl","revision","downloadUrl","vulnerabilities"],"properties":{"id":{"type":"string"},"name":{"type":"string"},"description":{"type":"string"},"author":{"type":"string"},"published":{"type":"string"},"platform":{"type":"string"},"type":{"type":"string"},"language":{"type":"string"},"source":{"type":"string"},"sourceUrl":{"type":"string"},"path":{"type":"string"},"revision":{"type":"string"},"filename":{"type":"string"},"url":{"type":"string"},"downloadUrl":{"type":"string"},"codeUrl":{"type":"string"},"licenseUrl":{"type":"string"},"imageUrl":{"type":"string"},"cves":{"type":"array","items":{"type":"string"}},"vulnerabilities":{"type":"array","description":"CVE context. Search uses cached data; detail and code requests refresh stale context.","items":{"$ref":"#/components/schemas/CveDetails"}}}}}}}