OAuth 20 Authorization Server Metadata Exposure

漏洞信息

漏洞名称: OAuth 2.0 Authorization Server Metadata Exposure

漏洞类型: 信息泄露

漏洞等级: 低危

漏洞描述: 该漏洞涉及OAuth 2.0授权服务器的元数据暴露问题。OAuth 2.0是一种广泛使用的授权框架,允许第三方应用代表资源所有者获取对服务器资源的有限访问权限。授权服务器是实现OAuth 2.0协议的核心组件,负责颁发访问令牌。根据RFC 8414,授权服务器可以通过一个众所周知的URI(/.well-known/oauth-authorization-server)公开其配置信息,包括发行者、授权端点等。这种设计虽然方便了客户端的自动发现和配置,但也可能导致敏感信息泄露,如服务器的实现细节和安全策略。攻击者可以利用这些信息进行进一步的攻击,如识别和利用服务器上的其他漏洞。尽管这种信息泄露本身可能不会直接导致系统被入侵,但它为攻击者提供了宝贵的情报,增加了系统的安全风险。此漏洞的利用不需要认证,且可以通过自动化工具轻松检测。

产品名称: OAuth 2.0 Authorization Server

搜索语法: inurl:”/.well-known/oauth-authorization-server”

来源: https://github.com/projectdiscovery/nuclei-templates/blob/b74dadcfa1d5809003a86f165725ec706d2a2ec9/http%2Fmiscellaneous%2Foauth-authorization-server-exposure.yaml

类型: projectdiscovery/nuclei-templates:github issues

POC详情

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38

id: oauth-authorization-server-exposure

info:
name: Well-Known OAuth Authorization Server Metadata
author: rxeriums
severity: info
description: |
Detects OAuth 2.0 Authorization Server metadata (RFC 8414).
impact: |
Presence of this well-known resource can expose implementation details or policies.
reference:
- https://www.rfc-editor.org/rfc/rfc8414
metadata:
verified: true
max-request: 1
google-query: inurl:"/.well-known/oauth-authorization-server"
tags: well-known,oauth,oidc,security,rfc8414

http:
- method: GET
path:
- "{{BaseURL}}/.well-known/oauth-authorization-server"

matchers-condition: and
matchers:
- type: word
part: body
words:
- "issuer"
- "authorization_endpoint"
condition: and

- type: status
status:
- 200