Broken Access Control

Broken access control vulnerabilities arise when an application fails to properly enforce restrictions on what authenticated users are allowed to do. Attackers can exploit broken access controls to gain unauthorized access to sensitive functions and data, such as viewing other users' private information or modifying data.

Anti-patterns

Incorrect sharing clauses

Because Apex generally runs in system context, permissions, field-level security, and sharing rules aren't taken into account during code execution. This might put applications at risk of inadvertently exposing sensitive data.
View anti-pattern

CRUD and FLS bypass

CRUD and FLS are authorisation settings that let Admins specify which objects and which fields on an object a user can access and modify. There are cases where developers use Visualforce or Lightning to display data derived from an SObject field in an indirect or processed form. In such scenarios CRUD and FLS should be manually enforced.
View anti-pattern

Insecure direct object references (DOR)

Insecure direct object references (IDORs) occur when an application provides direct access to objects based on user-supplied input. As a result of this vulnerability, attackers can bypass authorisation and access restricted resources.
View anti-pattern

Insecure page redirects

Open redirect is a vulnerability that occurs when an application can redirect the users to a URL contained within untrusted input. By modifying the untrusted input to a malicious site, an attacker may launch a phishing scam and steal user credentials.
View anti-pattern

Code vulnerable to cross-site request forgery (CSRF)

Cross-site request forgery, also known as one-click attack or session riding and abbreviated as CSRF or XSRF, is a vulnerability that enables attackers to send unauthorised commands that exploit a user's session. Unlike cross-site scripting (XSS), which exploits the trust a user has for a particular site, CSRF exploits the trust that a site has in a user's browser.
View anti-pattern

Access to Session ID in flows

To improve org security, an updated enforced with Summer '23 update prevents flows from accessing the $Api.Session_ID variable.
View anti-pattern