T05 · Unauthorized Access and Privilege Escalation
- Location
SKILL.md:49- Finding
Generated MTL Proxy Endpoints Lack Authentication and Authorization
- Content
View full analysis
getAlterSheet(@RequestParam("id") String id) { Map result = MapBuilder.of("success", true).build(); RequestMessage request = RequestMessage.builder() .method(HttpMethod.GET) .path("/dev/api/v1/alterSheet/detail") .json(null) .parameters(MapBuilder.ofAssignType("id", id).build()) .build(); try { ResponseMessage responseMessage = mtlClient.sendRequest(request); if (null == responseMessage) { throw new RuntimeException("response is null"); } result.put("data", LubanTypeUtil.toJSON(responseMessage.getJson())); } catch (Exception e) { result.put("success", false); result.put("msg", e.getMessage()); } return result; } ``` ### Technical Analysis The skill directs the agent to generate Spring MVC endpoints that forward requests through a server-held `ApiClient`. No authentication annotation, authorization policy, caller identity validation, role check, or resource-level access check is included. Consequently, any caller capable of reaching the generated `/mtl` route may be able to exercise the MTL permissions assigned to the application's client identity. This creates a confused-deputy condition in which an unprivileged caller causes the application to perform privileged operations on the ca ...[truncated 1581 chars]- Remediation
View remediation
