| शीर्षक | https://github.com/201206030/ novel commit 16d86e37b8d150aae6c238ee3df5379d7209a4b4 Missing Authentication |
|---|
| विवरण | Actuator exposure, committed credentials, banned-author bypass, unauthenticated upload- #58
Unauthenticated public image upload (Medium) — POST /api/front/resource/image is missing from the auth interceptor's path patterns entirely, so any anonymous caller can persist a file to server storage; the image-type check also runs after the file is already written to disk.
Unauthenticated upload (WebConfig.java / ResourceServiceImpl.java):
registry.addInterceptor(authInterceptor)
.addPathPatterns(ApiRouterConsts.API_FRONT_USER_URL_PREFIX + "/**",
ApiRouterConsts.API_AUTHOR_URL_PREFIX + "/**",
ApiRouterConsts.API_ADMIN_URL_PREFIX + "/**")
// API_FRONT_RESOURCE_URL_PREFIX is absent from this list
file.transferTo(saveFile);
if (Objects.isNull(ImageIO.read(saveFile))) {
Files.delete(saveFile.toPath());
throw new BusinessException(ErrorCodeEnum.USER_UPLOAD_FILE_TYPE_NOT_MATCH);
}
to reproduce:
curl -F "[email protected]" http://<host>:8888/api/front/resource/image with no Authorization header succeeds and the file is written to disk. |
|---|
| स्रोत | ⚠️ https://github.com/201206030/novel/pull/58 |
|---|
| उपयोगकर्ता | carfeii (UID 97470) |
|---|
| सबमिशन | 06/11/2026 06:10 PM (22 दिन पहले) |
|---|
| संयम | 29/11/2026 03:36 AM (22 days later) |
|---|
| स्थिति | स्वीकृत |
|---|
| VulDB प्रविष्टि | 445149 [xxyopen/201206030 novel तक 3.5.0 Image Upload ResourceServiceImpl.java uploadImage कमजोर प्रमाणीकरण] |
|---|
| अंक | 20 |
|---|