Summary
CyberPanel's AI Scanner worker API exposes unauthenticated endpoints that allow arbitrary data to be written directly into the application database.
By calling the status-webhook and callback URLs without credentials, a remote attacker can flood storage, corrupt scan history, and inject malicious or bogus data into persisted fields.
Affected context
This vulnerability affects CyberPanel deployments using the AI Scanner functionality where:
- The AI Scanner worker endpoints
/api/ai-scanner/status-webhookand/api/ai-scanner/callbackare reachable over the network - Requests to these endpoints are accepted without enforcing authentication or strong origin validation
- Data received from these endpoints is written to the database with limited or no additional integrity checks
In such environments, any remote party that can connect to these HTTP endpoints may influence database content related to scanning workflows.
Exploit preconditions
- Attack surface: Public or internal HTTP(S) exposure of
/api/ai-scanner/status-webhookand/api/ai-scanner/callback - Required access: None; endpoints accept unauthenticated requests
- Trigger point: Sending crafted HTTP requests that include arbitrary payloads to the AI Scanner worker API
- Why exploitation is possible: The endpoints were designed to be called by a trusted worker component, but the implementation does not enforce authentication, authorization, or a shared-secret mechanism, allowing any caller to be treated as a trusted worker and write unvalidated data into the database.
Why this happens
The core issue is a missing authentication control on sensitive backend endpoints intended for inter-service communication.
These AI Scanner worker endpoints implicitly trust whoever calls them and directly persist received data into the database, assuming the caller is a legitimate worker.
This maps to CWE-306: Missing Authentication for Critical Function, where operations that modify security-sensitive state or core application data are exposed without verifying the identity or legitimacy of the requester.
Conceptually, this is an insecure pattern where "internal" APIs are placed on a network-exposed interface without any form of credential, token validation, or strict origin binding.
Potential impact
- Remote, unauthenticated modification of AI Scanner-related database records
- Denial of service due to storage exhaustion by repeatedly inserting or updating large payloads
- Corruption of scan history and reporting data, leading to unreliable or misleading security scan results
- Pollution of database fields with attacker-controlled content that may impact logs, dashboards, or downstream analytics
- Potential facilitation of further attacks that rely on inconsistent or falsified scanning state (e.g., masking real threats or simulating bogus incidents)
General mitigation guidance
Effective mitigation focuses on enforcing strong authentication and trust boundaries for inter-service APIs:
- Require authentication (e.g., API keys, mutual TLS, signed tokens) for any endpoint that writes or updates database records
- Treat worker callbacks and webhooks as untrusted until verified using shared secrets, HMAC signatures, or equivalent request signing mechanisms
- Apply least-privilege design to worker roles so that callback endpoints can only update strictly scoped, validated fields
- Validate and sanitize all incoming data at these endpoints, enforcing strict schemas and rejecting unexpected or overly large payloads
- Isolate internal worker APIs behind network segmentation or service meshes rather than exposing them directly to the public internet
- Implement rate limits and size limits on callback endpoints to reduce the blast radius of abusive traffic
How teams detect issues like this
Detection typically leverages code-level inspection, runtime monitoring, and policy enforcement:
- Static analysis or manual code review to identify routes that:
- Modify database state
- Are registered in router/controller code
- Do not enforce authentication or authorization middleware
- Security review of "webhook" or "callback" style endpoints to confirm the presence of signature verification or shared-secret checks
- Web server and application logs monitored for unusual spikes in traffic to
/api/ai-scanner/status-webhookand/api/ai-scanner/callback, especially from unknown or external IP ranges - WAF or API gateway rules that flag or block unauthenticated requests attempting to execute database-modifying operations
- Automated security scanning tools integrated into CI/CD that enforce policies such as "no write-capable endpoint without authentication middleware"

