T05 · Unauthorized Access and Privilege Escalation
- Location
openapi.json:47- Finding
Certificate Metadata and Private-Key Downloads Lack Declared Authentication and Authorization
- Content
View full analysis
Vulnerability Details
File Location:
openapi.json:47-63,openapi.json:126-170, andSKILL.md:162-178
Vulnerability Type: Missing authentication and object-level authorization for sensitive certificate resources
Risk Level: CriticalVulnerable Code
openapi.json:47-63:json "/certificates": { "get": { "summary": "Certificates", "operationId": "certificates_certificates_get", "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": {} } } } } } }openapi.json:126-170:json "/download/{domain}/{filename}": { "get": { "summary": "Dl", "operationId": "dl_download__domain___filename__get", "parameters": [ { "name": "domain", "in": "path", "required": true, "schema": { "type": "string", "title": "Domain" } }, { "name": "filename", "in": "path", "required": true, "schema": { "type": "string", "title": "Filename" } } ], "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": {} } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } } } }SKILL.md:162-178:markdown ## GET /download/{domain}/{filename} **Summary:** Download Certificate **Description:** Downloads a generated certificate file in PEM, CRT, or KEY format. **Parameters:** | Name | Type | ...[truncated 2717 chars]- Remediation
View remediation
Remediation Suggestions
- Require strong authentication for
/certificatesand/download/{domain}/{filename}and declare the applicable security scheme in OpenAPI. - Perform server-side, object-level authorization for every request. Bind each certificate to an authenticated tenant or account and deny cross-tenant access.
- Do not expose private keys through predictable public paths. Prefer non-exportable keys stored in a KMS, HSM, or managed certificate service.
- If private-key export is an unavoidable requirement, require explicit privileged authorization, recent reauthentication, comprehensive audit logging, and a short-lived, single-use download token.
- Replace user-controlled domain and filename selectors with opaque artifact identifiers that cannot be enumerated.
- Return only tenant-scoped certificate metadata from
/certificates. - Add rate limiting and alerts for enumeration, repeated cross-domain requests, and private-key downloads.
- Encrypt exported key material, securely delete temporary copies, and provide a certificate revocation and key-rotation process for suspected exposure.
- Require strong authentication for
