You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: SECURITY.md
+79Lines changed: 79 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -14,3 +14,82 @@ End-of-life for the current release will be determined prior to the release of i
14
14
## Reporting a Vulnerability
15
15
16
16
You should report vulnerabilities using the [Github UI](https://github.com/panva/node-oidc-provider/security/advisories/new) or via email [email protected]
17
+
18
+
## Threat Model
19
+
20
+
This section documents the threat model for `oidc-provider`, an OAuth 2.0 Authorization Server implementation for Node.js with OpenID Connect support.
21
+
22
+
### Purpose and Intended Users
23
+
24
+
This library is intended for developers building OAuth 2.0 Authorization Servers and OpenID Connect Providers. It provides a comprehensive, certified implementation that can be configured and extended to fit various use cases.
25
+
26
+
### Trust Assumptions
27
+
28
+
#### Underlying Cryptographic Primitives
29
+
30
+
This library trusts that the cryptographic implementations provided by the runtime and its dependencies are correct and secure. The library delegates cryptographic operations to these implementations and does not attempt to validate or verify their correctness.
31
+
32
+
#### Runtime Environment
33
+
34
+
The library assumes it is running in a trusted execution environment. The following are considered outside the scope of this library's threat model:
35
+
36
+
-**Prototype pollution attacks**: If an attacker can modify JavaScript prototypes, this is considered a vulnerability in the user's application code or the runtime environment, not in this library.
37
+
-**Debugger access**: If an attacker has debugger access to the running process, they can inspect memory, modify variables, and bypass security controls. This is a runtime-level compromise, not a library vulnerability.
38
+
-**Runtime compromise**: Attacks that compromise the JavaScript runtime itself (e.g., malicious runtime modifications, compromised Node.js binaries) are not considered attacks on this library.
39
+
40
+
#### Configuration and User Code
41
+
42
+
Configuration provided by users is considered trusted. This includes adapter implementations, client registrations, policies, and all other configuration options. The library does not validate that configuration choices are secure for the user's specific deployment context.
43
+
44
+
#### Storage Adapter
45
+
46
+
The storage adapter (for persisting tokens, sessions, grants, etc.) is user-provided code and is considered trusted. The security of stored data depends on the adapter implementation and the underlying storage system chosen by the user.
47
+
48
+
#### Side-Channel Attacks
49
+
50
+
This library delegates cryptographic operations to underlying libraries. Any resistance to side-channel attacks (timing attacks, cache attacks, etc.) is entirely dependent on the underlying cryptographic implementations and is outside the scope of this library.
51
+
52
+
### Security Guarantees
53
+
54
+
This library aims to provide the following security guarantees:
55
+
56
+
-**Specification compliance**: Correct implementation of OAuth 2.0, OpenID Connect, and related specifications (including FAPI 1.0/2.0, CIBA), validated through OpenID Foundation conformance testing.
57
+
-**Secure defaults**: The library ships with secure default settings that follow current best practices.
58
+
-**Protocol security mechanisms**: Correct implementation of security mechanisms including:
59
+
- PKCE support and enforcement options
60
+
- Secure token generation
61
+
- Token binding (DPoP, mTLS)
62
+
- Session management
63
+
- Issuer identification
64
+
- JWT validation
65
+
-**Input validation**: Validation of inputs from clients and end-users.
66
+
67
+
### Out of Scope
68
+
69
+
#### Key Management
70
+
71
+
This library does not handle key storage. Users are responsible for securely storing, managing, and rotating cryptographic keys.
72
+
73
+
#### Memory Clearing
74
+
75
+
This library does not guarantee that key material or other sensitive data is cleared from memory after use. Secure memory management is the responsibility of the user and the runtime environment.
76
+
77
+
### Threat Actors and Security Properties
78
+
79
+
This library aims to provide the security properties defined by the OAuth 2.0 and OpenID Connect specifications. For detailed security considerations, refer to [RFC 6819 (OAuth 2.0 Threat Model)](https://www.rfc-editor.org/rfc/rfc6819), [OAuth 2.0 Security Best Current Practice](https://www.rfc-editor.org/rfc/rfc9700.html), and [OpenID Connect Core 1.0 Security Considerations](https://openid.net/specs/openid-connect-core-1_0.html#Security).
80
+
81
+
### What is NOT Considered a Vulnerability
82
+
83
+
The following are explicitly **not** considered vulnerabilities in this library:
84
+
85
+
-**Prototype pollution** ([CWE-1321](https://cwe.mitre.org/data/definitions/1321.html)): Attacks that exploit JavaScript prototype pollution are considered vulnerabilities in user application code or the runtime, not this library.
86
+
-**Object injection** ([CWE-915](https://cwe.mitre.org/data/definitions/915.html)): Similar to prototype pollution, object injection attacks are outside the scope of this library.
87
+
-**Debugger/inspector access** ([CWE-489](https://cwe.mitre.org/data/definitions/489.html)): If an attacker can attach a debugger to the process, they have already compromised the runtime environment.
88
+
-**Memory inspection**: Reading process memory, heap dumps, or core dumps to extract key material is a runtime-level attack.
89
+
-**Side-channel attacks** ([CWE-208](https://cwe.mitre.org/data/definitions/208.html)): Timing attacks, cache attacks, and other side-channel vulnerabilities in the underlying cryptographic implementations are not vulnerabilities in this library.
90
+
-**Compromised runtime environment**: Malicious or backdoored JavaScript runtimes, compromised system libraries, or tampered cryptographic implementations.
91
+
-**Supply chain attacks on the runtime** ([CWE-1357](https://cwe.mitre.org/data/definitions/1357.html)): Compromised Node.js binaries or similar supply chain attacks on the execution environment.
92
+
-**Supply chain attacks on dependencies** ([CWE-1357](https://cwe.mitre.org/data/definitions/1357.html)): This library has dependencies. Supply chain compromises of dependencies are not considered vulnerabilities in this library.
93
+
-**Denial of service via resource exhaustion** ([CWE-400](https://cwe.mitre.org/data/definitions/400.html)): While the library validates inputs, it does not implement resource limits. Applications should implement their own rate limiting and resource management.
94
+
-**Misconfiguration**: Security issues arising from insecure configuration choices (e.g., weak policies, insecure client settings) are the user's responsibility.
95
+
-**Insecure adapter implementations**: Security issues in user-provided storage adapters are the user's responsibility.
0 commit comments