|
1 | 1 | Angular is part of Google [Open Source Software Vulnerability Reward Program](https://bughunters.google.com/about/rules/6521337925468160/google-open-source-software-vulnerability-reward-program-rules). For vulnerabilities in Angular, please submit your report [here](https://bughunters.google.com/report). |
2 | 2 |
|
3 | 3 | For more information, check out [Angular's security policy](https://angular.dev/best-practices/security). |
| 4 | + |
| 5 | +## Policies |
| 6 | + |
| 7 | +The following defines some team policies around what does and does not constitute a security vulnerability. |
| 8 | + |
| 9 | +- Prototype pollution is itself a DoS vulnerability. |
| 10 | + - An attacker could pollute any symbol into the wrong type and cause an error, nothing we can do will prevent that. |
| 11 | + - Therefore we don't care about any DoS vulnerability which relies on prototype pollution as a precondition. |
| 12 | +- We trust the user's source code. |
| 13 | + - "A malicious repository can execute untrusted code" is not a viable attack vector. |
| 14 | + - A malicious repository could always rebind `node_modules/.bin/ng` to do something malicious, nothing we do can prevent that. |
| 15 | + - We assume it is always unsafe to run an untrusted repository outside of a sandbox. |
| 16 | +- DoS attacks which break only the attacker's client are not security issues. |
| 17 | + - Exception: DoS attacks which waste server resources significantly beyond the cost of the attacker's request may be security issues. |
| 18 | +- Memory leaks are considered general bugs, not DOS vulnerabilities. |
| 19 | + - While any memory leak is technically a DOS vulnerability in SSR, these are generally low enough impact to not be considered security issues. |
| 20 | +- Our public API contract is defined by our TS types, any issue which requires breaking those types (ex. via a cast to any) falls outside Angular's support. |
| 21 | + - Ex. It may be possible to leak user state by attaching it to some global data structure in SSR, but we do not consider this to be a valid vulnerability if you have to escape TS types to do it. |
| 22 | + |
| 23 | +## Invariants |
| 24 | + |
| 25 | +The following are invariants about Angular's technical infrastructure which limit some potential attack vectors. These statements are asserted by humans, not proven in any formal means. However, any security report should assume them to be true unless and until it can conclusively prove them to be false in an attack. If one of these statements invalidates a security report, that report bears the burden of conclusively demonstrating the statement to be false in its reproduction. |
| 26 | + |
| 27 | +- Zones don't leak across SSR requests (except for the root) |
| 28 | + - Every request gets its own Zone, so data stored on the Zone is unique to that user, no intrinsic risk of leaking user data from one request to an attacker's request. |
| 29 | +- Injectors are not shared between applications. |
| 30 | + - SSR always creates a new ApplicationRef and root services, no intrinsic risk of leaking user data from one request to an attacker's request. |
| 31 | + - Exception: Module-scoped data is shared and is a potential vector for data leakage. |
| 32 | +- SSR automatically catches all exceptions and issues a 500 to the current request, meaning an attacker triggering an uncaught exception is not a DoS attack. |
| 33 | +- `ngDevMode` / `ngServerMode` are set at compile time in production deployments and cannot be manipulated by attackers. |
0 commit comments