Angular OWASP Top 10 Vulnerabilities
Angular OWASP Top 10 Vulnerabilities
Version 2019.003
Use long and random session identifiers with high entropy Authorization checks
OWASP has a great cheat sheet offering practical advice [1] Implement proper authorization checks on API endpoints
Check if the user is authenticated
Client-side session state Check if the user is allowed to access the specific resources
Use signatures to protect the integrity of the session state Do not rely on client-side authorization checks for security
Adopt the proper signature scheme for your deployment
HMAC-based signatures only work within a single application
Cross-Origin Resource Sharing (CORS)
Public/private key signatures work well in distributed scenarios Prevent unauthorized cross-origin access with a strict policy
Verify the integrity of inbound state data on the backend Avoid whitelisting the null origin in your policy
Explicitly avoid the use of “decode-only” functions in libraries
Avoid blindly reflecting back the value of the origin header
Setup key management / key rotation for your signing keys
Avoid custom CORS implementations
Ensure you can handle session expiration and revocation Origin-matching code is error-prone, so prefer the use of libraries