Skip to main content

Overview

The API Scanner tests REST and GraphQL APIs for security vulnerabilities. It understands API specifications (OpenAPI/Swagger, Postman collections) and uses GraphQL introspection to test your API endpoints for security issues. The API Scanner is a vulnerability scanner: it actively tests APIs for security weaknesses. It does not add data to your Attack Surface. Identified vulnerabilities are reported as findings.

Supported targets

Target typeExamples
URLhttps://api.example.com, https://example.com/api/v1

Scan types

ModeDescriptionUse case
LightFast scan with basic security checksQuick assessment
DeepAll tests enabledFull security audit
CustomUser-configured API typeTargeted testing

Parameters comparison

ParameterLightDeepCustom
Authentication
API specification✓ (REST only)
API type selectionAutoAutoAuto / REST / GraphQL

Tests comparison

Initial tests
TestLightDeep
API fingerprinting
Known software vulnerabilities
SSL/TLS certificate analysis
Client access policies
HTTP DEBUG methods enabled
OpenAPI specification discovery
GraphQL endpoint discovery
GraphQL Information Disclosure
GraphQL Denial of Service (DoS)
HTTP OPTIONS method enabled
CORS misconfiguration
Passive checks
TestLightDeep
Secure Communication
Rate Limiting
OpenAPI Documents
Weak Password Submission
Error and Debug Messages
Internal Errors Exposure
Sensitive Data Exposure
Path Disclosure
Session Tokens in URLs
Active checks
TestLightDeep
SQL Injection
NoSQL Injection
OS Command Injection
Local File Inclusion (LFI)
PHP Code Injection
JavaScript Code Injection
Ruby Code Injection
Python Code Injection
Perl Code Injection
XML External Entity (XXE) Injection
Server-Side Template Injection (SSTI)
Log4j Remote Code Execution
Server Side Request Forgery (SSRF)
Open Redirect
Broken Authentication
Mass Assignment
IDOR
JWT Weaknesses
ViewState Remote Code Execution
Prototype Pollution
Request URL Override
HTTP Request Smuggling
Insecure Deserialization
Response Header Injection
The Deep scan performs active vulnerability testing and generates significant network traffic. Most correctly configured security monitoring systems will detect this scan. Do not use it if you don’t have proper authorization from the target API owner.

Custom scan

Allows you to select the API type to scan:
API TypeDescription
AutoAutomatically detects whether the API is REST or GraphQL (default)
RESTForces REST API scanning, can provide OpenAPI or Postman specification
GraphQLForces GraphQL API scanning. Uses introspection to discover schema
When GraphQL is selected, the Specification toggle is disabled. The scanner uses GraphQL introspection to automatically discover available queries, mutations, input types, and schema structure.

API specification

The Specification toggle controls whether you provide an API specification file. When enabled, you can provide a specification to ensure full endpoint coverage.
Toggle stateBehavior
EnabledProvide an OpenAPI or Postman specification, and the scanner tests all documented endpoints
DisabledScanner auto-discovers endpoints by fuzzing for OpenAPI locations and using introspection for GraphQL
Providing an API specification significantly improves scan coverage by ensuring all endpoints are tested, especially for REST APIs where auto-discovery may miss undocumented endpoints.

OpenAPI URL

Provide a publicly available URL to your OpenAPI 2.0/3.0 specification file (JSON or YAML format).
https://example.com/openapi.json
https://example.com/swagger.yaml
Before running the scan, validate your OpenAPI specification at editor.swagger.io to ensure it’s correctly formatted.

Upload OpenAPI specification

Upload your OpenAPI specification file directly. Supported formats:
  • JSON (.json)
  • YAML (.yaml, .yml)
Maximum file size: 10 MB

Upload Postman collection

Upload your Postman Collection file (v2.1). Supported format:
  • JSON (.json)
Maximum file size: 10 MB
Specification options are only available for REST APIs. When GraphQL is selected as the API type in Custom mode, the specification toggle is disabled and the scanner uses GraphQL introspection instead.

Initial tests

Initial tests identify the API framework, discover endpoints, and check for basic security issues. All initial tests run in both Light and Deep scans.
TestDescription
API fingerprintingIdentifies API framework, technology stack, and server software
Known software vulnerabilitiesChecks if detected software versions have known CVEs
SSL/TLS certificate analysisValidates certificate configuration, expiration, and trust chain
Client access policiesChecks crossdomain.xml and clientaccesspolicy.xml for overly permissive rules
HTTP DEBUG methods enabledTests if TRACE/TRACK methods are enabled (can enable XST attacks)
OpenAPI specification discoveryFuzzes common locations to find OpenAPI/Swagger specification files
GraphQL endpoint discoveryDiscovers GraphQL API endpoints and introspection
GraphQL Information DisclosureChecks for exposed introspection queries and schema leakage
GraphQL Denial of Service (DoS)Tests for deeply nested queries and resource exhaustion
HTTP OPTIONS method enabledChecks if OPTIONS method reveals allowed HTTP methods
CORS misconfigurationTests Cross-Origin Resource Sharing configuration for security issues

Passive checks

Passive checks analyze API responses without sending attack payloads. See the tests comparison table for Light vs Deep availability.
TestDescription
Secure CommunicationChecks for HTTPS enforcement and secure transport
Rate LimitingChecks for missing rate limit headers
OpenAPI DocumentsDiscovers OpenAPI specification files
Weak Password SubmissionChecks if passwords are submitted insecurely
Error and Debug MessagesFinds debug information and error messages in responses
Internal Errors ExposureDetects exposed internal error details
Sensitive Data ExposureIdentifies sensitive information in API responses
Path DisclosureDetects exposed filesystem paths
Session Tokens in URLsDetects session IDs passed in URLs

Active checks

Active checks send payloads to identify exploitable vulnerabilities. See the tests comparison table for Light vs Deep availability.
TestDescription
SQL InjectionTests for SQL injection flaws in API parameters
NoSQL InjectionTests for injection in MongoDB, CouchDB, and other NoSQL databases
OS Command InjectionTests for command execution on the underlying operating system
Local File Inclusion (LFI)Tests for path traversal and local file read vulnerabilities
PHP Code InjectionTests for PHP code execution in parameters
JavaScript Code InjectionTests for Node.js code execution
Ruby Code InjectionTests for Ruby code execution
Python Code InjectionTests for Python code execution
Perl Code InjectionTests for Perl code execution
XML External Entity (XXE) InjectionTests for XXE attacks that can read files or perform SSRF
Server-Side Template Injection (SSTI)Tests for template engine exploitation
Log4j Remote Code ExecutionTests for Log4Shell (CVE-2021-44228) and related vulnerabilities
Server Side Request Forgery (SSRF)Tests if the server can be tricked into making requests to internal resources
Open RedirectTests for URL redirect vulnerabilities
Broken AuthenticationTests for authentication bypass and weak authentication mechanisms (API-specific)
Mass AssignmentTests for mass assignment vulnerabilities in API endpoints
IDORTests for Insecure Direct Object Reference vulnerabilities
JWT WeaknessesTests for JWT algorithm confusion, weak secrets, and other flaws
ViewState Remote Code ExecutionTests for .NET ViewState deserialization attacks
Prototype PollutionTests for JavaScript prototype pollution vulnerabilities
Request URL OverrideTests for host header injection and URL override attacks
HTTP Request SmugglingTests for request smuggling between front-end and back-end servers
Insecure DeserializationTests for unsafe deserialization leading to RCE
Response Header InjectionTests for CRLF injection in HTTP headers

Authentication

Configure authentication to test protected API endpoints. Authentication is available in Deep and Custom scan modes only. The API Scanner supports header-based authentication for APIs using JWT tokens, Bearer tokens, API keys, or custom authorization schemes. How to configure:
1

Enable authentication

Enable Authentication in the scan configuration.
2

Enter headers

Enter your authentication headers (one per line).
Example:
Authorization: Bearer eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9...
X-API-Key: your-api-key-here
Use caseHeader format
JWT Bearer tokenAuthorization: Bearer <token>
Basic authenticationAuthorization: Basic <base64-credentials>
API keyX-API-Key: <key>
Custom tokenX-Auth-Token: <token>
If your API uses multiple authentication mechanisms (e.g., both a Bearer token and an API key), include all required headers on separate lines.
For more details, see Authenticated scanning > API Scanner.

How it works

The API Scanner works in these steps:
  1. Discovery: Identifies API type (REST or GraphQL) and parses specifications
  2. Fingerprinting: Identifies API framework and technology stack
  3. Endpoint mapping: Extracts all endpoints from specification or introspection
  4. Passive analysis: Analyzes all responses for security issues without sending payloads
  5. Active testing: Injects payloads into parameters to test for vulnerabilities (Deep scan only)
  6. Reporting: Generates findings with evidence and remediation guidance
For REST APIs, the scanner parses OpenAPI or Postman collection files to identify all available endpoints and their parameters. For GraphQL APIs, the scanner parses the introspection schema to discover available queries, mutations, and types.

Follow-up actions

After identifying vulnerabilities:
  • Prioritize by severity: Address Critical and High findings first
  • Test web application: Run Website Scanner for the frontend
  • Review authentication: Strengthen API authentication mechanisms
  • Implement rate limiting: Add rate limiting to prevent abuse
  • Schedule regular scans: Set up Scheduled scans for continuous monitoring