Unhandled endpoint¶
Description¶
Some endpoint can be found in the introspection but have no handler implemented.
Remediation¶
Either remove the endpoint from your schema or create a handler for them.
REST Specific¶
Asp_net
Ensure that all endpoints defined in the API are properly handled in the ASP.NET routing configuration. Implement appropriate action methods in the controllers for each endpoint, and if an endpoint should not be available, remove it from the API routing table or return a 'Not Implemented' status code.Ruby_on_rails
Ensure that all routes defined in the Rails application have corresponding controller actions implemented. Use route constraints to limit unexpected routes and provide a catch-all route at the bottom of your routes file to handle unmatched requests with a custom 404 error page.Next_js
Ensure that all endpoints defined in the API are properly handled in the Next.js pages or API routes. Implement appropriate request handlers for each endpoint or remove unused endpoints from the introspection system to prevent potential security vulnerabilities.Laravel
Ensure that all routes defined in the Laravel application have corresponding controller methods implemented. Use route:list command to review registered routes and verify that each one has an appropriate handler. Implement middleware to catch any unhandled routes and provide a default response or redirect to a known route.Express_js
Ensure that all defined routes in your Express.js application have corresponding route handlers. For any unhandled endpoints, implement a catch-all route handler to return an appropriate error message, such as 404 Not Found, to the client. Additionally, consider using middleware for logging and monitoring to track these unhandled endpoints and take corrective actions.Django
Ensure that all endpoints defined in your Django application's URL configurations have corresponding view functions or classes implemented. Use Django's built-in 404 error handling to catch any unhandled endpoints and provide a user-friendly error page.Symfony
Ensure that all endpoints defined in the routing configuration have corresponding controller actions implemented. Use Symfony's debug:router console command to list all registered routes and verify that each one is handled properly. If an endpoint is not needed, remove it from the routing configuration to prevent unintended access.Spring_boot
Ensure that all endpoints defined in the Spring Boot application are mapped to appropriate handler methods. If an endpoint is discovered during introspection without a corresponding handler, implement the necessary @RequestMapping or specific mapping annotations like @GetMapping, @PostMapping, etc., to handle the request properly. Additionally, consider using a global @ControllerAdvice to handle unmapped endpoints and provide a default response.Flask
Ensure that all endpoints defined in the Flask application have corresponding view functions. Use the `@app.route` decorator to map URLs to view functions and return appropriate responses. If an endpoint should not be accessible, remove it from the URL map or implement a handler that returns a 404 or 403 status code. Regularly review your routing table and update the handlers as necessary to prevent unhandled endpoints.Nuxt
Ensure that all defined routes in your Nuxt.js application have corresponding page components or server middleware to handle the requests. If an endpoint is not meant to be accessible, remove it from the configuration or set up a catch-all route to handle undefined paths and provide a proper response, such as a 404 error page.Fastapi
Ensure that all endpoints defined in the API documentation are implemented with corresponding request handlers in the FastAPI application. For any endpoints that are currently unhandled, create appropriate route functions with the @app.route decorator, specifying the path, HTTP method, and request handling logic. Additionally, consider implementing a default route handler for undefined routes to return a 404 error with a clear message indicating that the endpoint is not available.Frappe
Implement handler functions for all unhandled endpoints in the Frappe framework to ensure proper request processing and avoid potential errors.Genzio
Implement handlers for all endpoints found in introspection to ensure they are properly managed and do not lead to unhandled requests in the Genzio framework engine.Gin
Implement a handler function for each unhandled endpoint in the Gin framework to ensure all routes are properly managed and do not lead to unintentional errors or security vulnerabilities.Gorilla
Implement a handler for each unhandled endpoint in the Gorilla framework to ensure all endpoints are properly managed and functional.Hapi
Ensure all defined endpoints in the Hapi framework have corresponding route handlers implemented to prevent unhandled endpoint errors.Hono
Implement a handler for each unhandled endpoint in the Hono framework to ensure all endpoints are properly managed and functional.Jersey
Implement a request handler for each unhandled endpoint in the Jersey framework to ensure all endpoints are properly managed and functional.Koa
Ensure all defined endpoints in the Koa application have corresponding handler functions implemented to prevent unhandled requests.Ktor
Implement a handler for each unhandled endpoint in the Ktor application to ensure all routes are properly managed and do not lead to unexpected behavior.Leptos
Implement a handler for each unhandled endpoint in the Leptos framework to ensure all routes are properly managed and do not lead to unexpected behavior.Macaron
Implement a handler for each unhandled endpoint in the Macaron framework to ensure all routes are properly managed.Phoenix
Implement a handler function for each unhandled endpoint in the Phoenix router to ensure all routes are properly managed.Redwoodjs
Implement a handler for each unhandled endpoint in the RedwoodJS framework to ensure all routes are properly managed and do not lead to unexpected behavior.Rocket
Implement a handler for each unhandled endpoint in the Rocket framework to ensure all routes are properly managed and do not lead to unexpected behavior.Sveltekit
Ensure all defined endpoints in SvelteKit have corresponding handler functions implemented to prevent unhandled endpoint errors.Configuration¶
Identifier:
configuration/unhandled_endpoint
Examples¶
Ignore this check¶
Score¶
- Escape Severity:
Compliance¶
- OWASP: API2:2023
- OWASP LLM: LLM07:2023
- pci: 6.5.10
- gdpr: Article-32
- soc2: CC1
- psd2: Article-95
- iso27001: A.14.2
- nist: SP800-53
- fedramp: AC-2
Classification¶
- CWE: 453
Score¶
- CVSS_VECTOR: CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:N