Sec1
ProductsBook A DemoContact Us
  • Sec1 Documentation
  • Quick Start
    • Login to Sec1
    • Your First Scan
    • View Results
  • Integration with Sec1
    • Registration & Login
      • Login with GITHub
      • New Registration
      • Forgot Password
      • Team Administration
    • Scan
    • Dashboard
    • Auto Fix
    • Integration with Sec1 CLI
      • Sec1 CLI (Command Line Interface) Overview
        • Config
        • Scan
        • Search
    • Integration with CI/CD
      • Jenkins Integration
      • Github Actions
      • Azure DevOps Extension for Sec1 Security
      • Azure DevOps Extension for Sec1 Container Image Scanner
      • GCP Code Build
      • Gitlab CI/CD Component
      • Integration with CircleCI Using the Sec1 Orb
      • Teamcity Plugin
    • How to Get Your API Key
  • External Integrations
    • GITHub Integration
    • Azure SCM Integration
    • Notifications
    • Generate Sec1 API Token
  • Static Application Security Testing
    • SAST Java Rules
      • GIT Leaks
      • Leakage of Information in Logger Message
      • Leakage of sensitive data in cookie
      • Leakage of sensitive data in exception message
      • Leakage of sensitive data to Airbrake
      • Leakage of sensitive data to Algolia
      • Leakage of Sensitive Data to Bugsnag
      • Leakage of Sensitive Data to ClickHouse
      • Leakage of Sensitive Data to Datadog
      • Leakage of Sensitive Data to ElasticSearch
      • Leakage of Sensitive Data to New Relic
      • Leakage of Sensitive Data to OpenTelemetry
      • Leakage of Sensitive Data to RollBar
      • Leakage of Sensitive Data to Sentry
      • Leakage of Sensitive Information in Exception Messages
      • Leakage of sensitive information in logger message
      • Missing authentication for database
      • Missing database password detected
      • Missing HTTP Only Option in Cookie Configuration
      • Missing Optimal Asymmetric Encryption Padding (OAEP)
      • Missing or Permissive SSL Hostname Verifier
      • Missing Protection against Session Fixation Attacks
      • Missing Secure option in cookie configuration
      • Missing signature verification of JWT
      • Missing SSL host check in SMTP
      • Missing Support for Integrity Check
      • Missing TLS validation
      • Observable Timing Discrepancy
      • Permissive Access-Control-Allow-Origin configuration
      • Permissive context mode for resources
      • Permissive cookie configuration
      • Permissive HTTP Only option in cookie configuration
      • Permissive Screenshot option set
      • Possible CLRF injection detected
      • Possible expression language (EL) injection detected
      • Possible HTTP Parameter Pollution detected
      • Unsanitized external input in SQL query
      • Unsanitized use of FileUpload filename
      • Unsanitized user input in 'eval' type function
      • Unsanitized user input in Access-Control-Allow-Origin
      • Unsanitized user input in AWS query
      • Unsanitized user input in code generation
      • Unsanitized user input in deserialization method
      • Unsanitized User Input in File Path Traversal
      • Unsanitized User Input in File Path
      • Unsanitized user input in format string detected
      • Unsanitized user input in HTTP request (SSRF)
      • Unsanitized user input in HTTP response (XSS)
      • Unsanitized user input in LDAP request
      • Unsanitized user input in logger message
      • Unsanitized User Input in OS Command
      • Unsanitized User Input in Output Stream (XSS)
      • Unsanitized User input in Redirect
      • Unsanitized User Input in Regular Expression
      • Unsanitized user input in SQL catalog configuration
      • Unsanitized user input in XML External Entity
      • Unsanitized User Input in XPath
      • Usage of bad hex conversion on digest array
      • Usage of CBC (Cipher Block Chaining) Mode with Padding
      • Usage of custom Digest class
      • Usage of dangerous permissions
      • Usage of ECB Cipher Mode
      • Usage of External Input in Code Reflection
      • Usage of hard-coded database password
      • Usage of hard-coded secret
      • Usage of insufficient random value
      • Usage of naive Socket class to create SSL Socket
      • Usage of permissive file permission ('other')
      • Usage of small key size with Blowfish encryption
      • Usage of Trusted and Untrusted Data inside the same Data Structure
      • Usage of vulnerable Apache Commons Collections InvokeTransformer class
      • Usage of weak encryption algorithm (DES)
      • Usage of Weak Hashing Library on a Password (SHA-1)
      • Usage of Weak Hashing library (MD5)
    • SAST JavaScript Rules
      • Leakage of hard-coded secret in JWT
      • Leakage of information in logger message
      • Leakage of sensitive data in dynamic file generation
      • Leakage of sensitive data in exception message
      • Leakage of sensitive data in JWT
      • Leakage of sensitive data in local storage
      • Leakage of sensitive data to Airbrake
      • Leakage of sensitive data to Algolia
      • Leakage of sensitive data to Bugsnag
      • Leakage of sensitive data to Datadog RUM
      • Leakage of sensitive data to Datadog
      • Leakage of sensitive data to ElasticSearch
      • Leakage of sensitive data to Google Analytics (React)
      • Leakage of sensitive data to Google Analytics
      • Leakage of sensitive data to Google Tag Manager
      • Leakage of sensitive data to HoneyBadger
      • Leakage of sensitive data to New Relic
      • Leakage of sensitive data to OpenTelemetry
      • Leakage of sensitive data to OpenAI
      • Leakage of sensitive data to RollBar
      • Leakage of sensitive data to Segment
      • Leakage of sensitive data to Sentry
      • Leakage of sensitive information in logger message
      • Missing Access Restriction on Directory Listing
      • Missing escape of HTML entities in Handlebars template compilation
      • Missing Helmet configuration on HTTP headers
      • Leakage of Sensitive Information in Exception Messages
      • Missing origin check in message handler
      • Missing Revoke Method on JWT
      • Missing Secure HTTP server Configuration
      • Missing Secure option in Cookie Configuration
      • Missing Server Configuration to reduce Server Fingerprinting
      • Missing TLS validation
      • Observable Timing Discrepancy
      • Permissive file assignment
      • Permissive origin in postMessage
      • Unsanitized dynamic input in file path traversal
      • Unsanitized dynamic input in file path
      • Unsanitized Dynamic input in OS Command
      • Unsanitized dynamic input in regular expression
      • Unsanitized input in NoSQL query
      • Unsanitized user input in 'eval' type function
      • Unsanitized user input in React inner HTML method (XSS)
      • Unsanitized user input in Access-Control-Allow-Origin
      • Unsanitized user input in deserialization method
      • Unsanitized user input in deserialization method
      • Unsanitized user input in dynamic HTML insertion (XSS)
      • Unsanitized user input in DynamoDB query
      • Unsanitized User Input in File Path Traversal
      • Unsanitized user input in format string
      • Unsanitized user input in HTTP request (SSRF)
      • Unsanitized user input in HTTP request (SSRF)
      • Unsanitized user input in HTTP response (XSS)
      • Unsanitized User input in HTTP Send file request
      • Unsanitized User input in OS command
      • Unsanitized user input in raw HTML strings (XSS)
      • Unsanitized User input in Redirect HAPI
      • Unsanitized user input in redirect
      • Unsanitized User input in Redirect
      • Unsanitized user input in regular expression
      • Unsanitized User Input in Resource Rendering
      • Unsanitized input in SQL query
      • Unsanitized User Input in UI
      • Unsanitized user input in XML parsing method
      • Usage of default Cookie Configuration
      • Usage of Default Session Cookie Configuration
      • Usage of externally controlled input to select code
      • Usage of hard-coded Passport Secret
      • Usage of hard-coded secret
      • Usage of Hard-Coded Secret
      • Usage of insecure HTTP connection
      • Usage of insecure websocket connection
      • Usage of insufficient random value
      • Usage of manual HTML sanitization (XSS)
      • Usage of Session on Static Asset (CSRF)
      • Usage of vulnerable DOMPurify package
      • Usage of vulnerable marked package
      • Usage of weak encryption algorithm (DES)
      • Usage of weak encryption algorithm on a password (DES)
      • Usage of weak encryption algorithm on a password (RC4)
      • Usage of weak encryption algorithm (RC4)
      • Usage of weak hashing library (MD5)
      • Usage of weak hashing library on a password (Argon2)
      • Usage of weak hashing library on a password (MD5)
      • Usage of weak hashing library on a password (SHA-1)
      • Usage of weak hashing library (SHA-1)
  • SBOM Scanner
    • Config
    • Scan
  • CISO Console
  • Pricing & Billing
  • CVE API
Powered by GitBook
On this page
  • Endpoint
  • POST /cve/v1/cve-details
  • Error Handling
  • Notes on API Usage

CVE API

PreviousPricing & Billing

Last updated 9 months ago

Endpoint

  • Host: https://api.sec1.io

  • Context: /rest/foss

  • Endpoint: /cve/v1/cve-details

POST /cve/v1/cve-details

Fetches details about CVEs based on the search criteria. By default, it returns the latest 20 CVEs.

Security:

  • Requires API key authentication (header: sec1-api-key)

Request Body:

{
  "cveIdList": ["string"],
  "component": "string",
  "ecosystem": ["string"],
  "pageNumber": "string",
  "pageSize": "string",
  "sortBy": "string",
  "sortOrder": "string",
  "fromDate": "YYYY-MM-DD",
  "toDate": "YYYY-MM-DD",
  "severity": ["string"],
  "kev": boolean,
  "zeroDay": boolean
}

Parameters:

  • cveIdList: List of CVE IDs to search for

  • component: Component to search for (e.g., "spring-core 3.0")

  • ecosystem: List of ecosystems to filter by. e.g. maven, linux, npm

  • pageNumber: Page number for pagination (starts from 1)

  • pageSize: Number of results per page (default: 20, max: 100)

  • sortBy: Field to sort by. Allowed fields - publishedDate, lastModifiedDate, cveId, severity. Default: publishedDate

  • sortOrder: Order to sort by (asc or desc). Default: desc

  • fromDate: Start date for the search range e.g. 2024-08-24

  • toDate: End date for the search range e.g. 2024-04-02

  • severity: List of severity levels to filter by e.g. ['critical','high','medium','low']

  • kev: Filter by Known Exploited Vulnerability (KEV) status

  • zeroDay: Filter by zero-day vulnerability status

Notes:

  • At least one of the following search fields must be provided: cveIdList, component, ecosystem, severity, kev, or zeroDay.

  • If cveIdList is provided, all other search criteria will be ignored.

  • The component field allows searching for specific components, e.g., "spring-core 3.0".

  • If no pageSize is specified, the API returns 20 results by default.

  • The maximum allowed pageSize is 100. If a larger value is provided, it will be capped at 100.

Example request:

POST /rest/foss/cve/v1/cve-details HTTP/1.1
Host: api.sec1.io
Content-Type: application/json
sec1-api-key: your_api_key_here
{
  "cveIdList": ["CVE-2022-22965", "CVE-2023-38408"],
  "ecosystem": ["maven"],
  "pageSize": "1",
  "sortBy": "publishedDate",
  "sortOrder": "desc",
  "severity": ["critical", "high"]
}

Example response:

HTTP/1.1 200 OK
Content-Type: application/json
{
  "responseData": [
    {
      "cveId": "CVE-2022-22965",
      "description": "A Spring MVC or Spring WebFlux application running on JDK 9+ may be vulnerable to remote code execution (RCE) via data binding. The specific exploit requires the application to run on Tomcat as a WAR deployment. If the application is deployed as a Spring Boot executable jar, i.e. the default, it is not vulnerable to the exploit. However, the nature of the vulnerability is more general, and there may be other ways to exploit it.",
      "publishedDate": "2022-04-01 23:15:00.0",
      "lastModifiedDate": "2023-02-09 02:07:00.0",
      "cvssV3BaseScore": "9.8",
      "cvssV3BaseSeverity": "CRITICAL",
      "cvssV2BaseScore": "7.5",
      "cvssV2BaseSeverity": "HIGH",
      "cveStatus": "PUBLIC",
      "zeroDay": true,
      "epss": "0.974830000",
      "percentile": "0.999730000",
      "epssDate": "2024-06-14",
      "cveTypes": [
        {
          "cweId": "CWE-94",
          "cveType": "Code Injection"
        }
      ],
      "owaspTop10Tags": [
        {
          "id": "A03_2021-Injection",
          "name": "A03:2021 – Injection"
        }
      ],
      "impactedPackages": [
        {
          "packageurl": "pkg:maven/org.springframework/spring-webmvc",
          "ecosystem": "maven",
          "impactedVersions": ["5.3.0", "5.3.1", "5.3.2", "...", "5.3.17"],
          "nonImpactedVersions": ["5.3.18", "5.3.19", "5.3.20", "...", "6.1.12"],
          "recommendedVersion": "5.2.20.RELEASE",
          "affectedRanges": [
            "<5.2.20.RELEASE",
            ">=5.3.0, <5.3.18"
          ]
        }
      ],
      "referenceUrls": {
        "linux-debian": [
          "https://security-tracker.debian.org/tracker/CVE-2022-22965"
        ],
        "linux-redhat": [
          "https://access.redhat.com/security/cve/CVE-2022-22965"
        ]
      }
    }
  ],
  "errorMessage": "",
  "cveCount": 1
}

Error Handling

HTTP Status Codes:

  • 200 OK: The request was processed successfully. This includes cases where the request was valid but no results were found, or when there are validation errors in the search criteria.

  • 401 Unauthorized: The API key is invalid or not provided.

  • 500 Internal Server Error: Unexpected server-side errors.

Error Messages: For requests that return a 200 status code, error messages may be included in the response body under the errorMessage field. Some possible error messages include:

"At least one of the search fields must be provided from 'cveIdList, ecosystem, component, severity, kev, zeroDay'. Please update your search criteria."
"From date is greater than last 100 days. API only supports from date less than last 100 days. Update your search query."
"There is some data which is older than last 100 days."

Example error response (200 OK with error message):

{
  "searchType": "COMPONENT",
  "responseData": [],
  "ecosystemFilterList": [],
  "errorMessage": "At least one of the search fields must be provided from 'cveIdList, ecosystem, component, severity, kev, zeroDay'. Please update your search criteria.",
  "cveCount": 0
}

Example 401 Unauthorized response:

HTTP/1.1 401 Unauthorized
Content-Type: application/json

{
  "errorMessage": "Invalid or missing API key"
}

Notes on API Usage

  • If cveIdList is provided, all other search criteria will be ignored.

  • Ensure that at least one of the required search fields (cveIdList, ecosystem, component, severity, kev, zeroDay) is provided in each request.

  • When specifying dates, ensure that the fromDate is not more than 100 days in the past.

  • The API key must be included in the sec1-api-key header for all requests. Requests without a valid API key will receive a 401 Unauthorized response.

  • If you receive an error message about data being older than last 100 days, consider adjusting your date range or consulting the API provider for access to historical data.

How to get API key?