SaltSecurity Ebook OWASP API Top10 2023
SaltSecurity Ebook OWASP API Top10 2023
APIs have become critical for today’s organizations. They connect modern
applications, enable business innovation, and allow companies to meet their
customers’ increasingly high expectations.
The explosion in API use has not gone unnoticed by cybercriminals. In fact,
APIs have become a primary target for attacks in recent years, in line with
Gartner’s prediction that “by 2022, API abuses will move from an infrequent to
the most-frequent attack vector, resulting in data breaches for enterprise web
applications.” The analyst firm has since acknowledged that the prediction
was right and recognizesd the need for dedicated API protections by placing
API security in its own category in its latest security architecture reference.
With 94% of survey respondents in the most recent State of API Security
report by Salt Labs admitting that they have experienced API security
problems in production and Salt Labs’ researchers finding a 400% increase
in API attacks targeting Salt Security customers, it’s unsurprising that API-
related security incidents and breaches have been getting more and more
attention in recent years. At the end of 2019, the Open Web Application
Security Project (OWASP), an open-source community that focuses on
improving the security of software, released the first-ever API Security Top
10 to raise awareness about the most common API security threats back in
2019. The top 10 has been updated in June 2023 to reflect the changing API
security landscape.
This ebook explores the top vulnerabilities listed in the OWASP API Security
Top 10, what they look like in the real world, and how you can protect your
organization from the threats targeting your APIs and API-based applications.
The OWASP API Security Top 10 2023 published in June 2023 provides an
updated version of the OWASP API Top 10 2019. While the two lists have
many similarities, the changes introduced in 2023 are aimed at reflecting the
evolving API security landscape and addressing new attack vectors that have
been emerging in recent years.
The OWASP API Security Top 10 provides the most up-to-date list of existing
API security threats and highlights the need for dedicated API protections
that go beyond traditional cybersecurity approaches.
As APIs frequently expose endpoints that handle object IDs, this creates
a large potential attack surface. Object level authorization is an access
control method that is typically implemented at the code level to verify a
user’s ability to access a certain object. Modern applications use a variety of
intricate and pervasive authorization and access control systems. Developers
frequently neglect to apply these checks before accessing an object, even
when an application includes a robust infrastructure for authorization checks.
Attackers can easily exploit API endpoints that are vulnerable to broken
object level authorization by manipulating the ID of an object that is sent
within an API request. These vulnerabilities are extremely common in API-
based applications because the server component usually does not fully track
the client’s state. Instead, the server component usually relies on parameters
like object IDs sent from the client, to decide which objects can be accessed.
Regardless of the level of sensitivity of the data, any unlawful access to data
needs to be taken seriously and the fact is that automated static or dynamic
testing cannot readily find these kinds of authorization problems.
What does Broken Object Level Authorization (BOLA) look like in real
life?
Verizon
Another public BOLA breach happened at Verizon, where a cyber researcher
managed to expose the vulnerability by changing a contract number to
access a customer account.
While authentication was needed to access the files, the researcher could
successfully brute force the URL’s GET parameters and modify one of the
parameters to gain access to a different customer contract. This is a very
difficult type of attack to detect and it allowed access to Verizon’s entire
database of contracts.
Traditional security controls cannot tell the difference between the various
types of sophisticated attacks that target authentication, such as credential
stuffing and credential cracking, since they are unable to follow attack traffic
over time. To prevent sophisticated attacks that target authentication, an API
security solution must be able to profile the typical authentication sequence
for each API flow in order to detect abnormal behavior, such as missing
credentials, missing authentication factors, or authentication calls that are out
of order.
Booking.com
In March 2023, researchers from Salt Labs, the research arm of Salt Security,
identified several security vulnerabilities in the world-renowned vacation
booking platform Booking.com. These authentication flaws could have
enabled attackers to take over users’ accounts, exfiltrate private account
data, and cancel or book reservations and perform other actions on their
behalf.
Parler
Another prime example of a broken authentication attack took place in
January 2021 targeting social media platform Parler.
When analyzing the Parler data breach, Salt Security found that Parler’s
authentication was at least partially absent. This flaw, along with other
security vulnerabilities, allowed for the scraping of 70 TB of data from the
platform, with at least one API endpoint requiring no authentication at all to
access user data.
The shutdown of Parler was a valuable learning experience for social media
services and any organization offering a public web service that stores and
presents personally identifiable information (PII).
APIs usually expose endpoints that return all object’s properties. This is
particularly true for REST APIs. For other protocols such as GraphQL, the API
may require crafted requests to specify which properties should be returned.
Identifying these additional properties that can be manipulated requires
effort, but is essential to prevent the exploitation of this type of vulnerability.
The main reason for introducing this new threat on the list is that, even if an
API can enforce sufficient object-level authorization security measures, this
might still not be enough to protect it. More specific authorization that covers
the objects and their characteristics is often required. The varying access
levels within an API object must also be taken into account, as an API object
often has both a public property and a private one.
Twitter
According to a statement released by Twitter in August 2022, a broken
object properly level authorization vulnerability was initially spotted by their
bug bounty program in January 2022. As a result of the flaw, if someone
submitted an email address or phone number to Twitter’s systems, they
would be informed of what Twitter account the submitted email addresses or
phone number was associated with, if any. The issue was investigated and
fixed by Twitter at the time with no evidence to suggest it had been exploited
in the wild. However, in July 2022, it came to light that a bad actor had taken
advantage of the issue before it was addressed by the company and was
now offering to sell the data they compiled.
This very public incident brought to light the risk that this type of security
vulnerabilities can pose, even for a well-established brand with vast
resources and supposedly robust security programs.
Additionally, the GPS locations of users were exposed since the filtering of
the data was limited to the mobile app. Anyone could query the 3Fun server
for the location of other users.
This vulnerability became even more scandalous because some of the GPS
locations found by researchers pointed to the White House and the US
Supreme Court.
While Peloton fixed the identified API flaws quickly, the company didn’t
adhere to its own documented vulnerability disclosure program, resulting
in the disclosure of the breach within mainstream media by the security
researcher and the pen test firm that alerted them.
Resources like the network, CPU, memory, and storage are used up by API
calls. The user’s input and the endpoint’s business logic have a significant
impact on the number of resources needed to fulfill a request. The size or
quantity of resources that a client or user may request may not necessarily be
constrained by APIs. This not only has the potential to negatively affect API
server performance and cause Denial of Service (DoS), but it also makes APIs
that support authentication and data retrieval vulnerable to brute-force and
enumeration assaults, including token and credential cracking. The impact of
this threat can be broken down into two components:
SoundCloud
In 2020, a cyber research team at Checkmarx found that SoundCloud had
not properly implemented rate limiting for the /tracks endpoint of their api-v2.
soundcloud.com API.
Since no validation was performed for the number of track IDs in the IDs list,
an attacker could manipulate the list to retrieve an arbitrary number of tracks
in a single request and overwhelm the server.
Reddit
In July 2022, a researcher at HackerOne found that after an ad campaign was
created on Reddit’s site, there needed to be approval from Reddit admins
to verify that a payment was verified. However, by sending a certain PATCH
request regarding the ad, the researcher was able to bypass this admin
approval and simply activate the team’s own ad campaign, which broke the
standard access control.
This vulnerability meant that by sending a PATCH request, any user could
approve their own ad campaigns without paying for them with critical
business implications for Reddit in lost ad revenue.
The HackerOne researcher earned a $5000 bounty from Reddit for finding
and communicating this flaw, which allowed Reddit to fix the issue and
New Relic
In 2018, researcher Jon Bottarini found that a user could make changes
to alerts on Synthetics monitors at software vendor New Relic without
the proper permissions to do so. In fact, even a restricted user could
make changes with no permissions at all because of a privilege escalation
weakness that was present in the product at that time. To explore this
vulnerability, a hacker simply needed to send a legitimate request to an API
endpoint that was otherwise not visible to the restricted user.
This threat has replaced Mass Assignment as number 6 on the OWASP API
Security Top 10 list. It occurs when an API exposes a business flow without
compensating for how the functionality could cause harm if used excessively
through automation.
To exploit this vulnerability, a bad actor will need to understand the business
logic behind the API in question, find sensitive business flows and automate
access to these flows in a way that can harm the business.
This issue usually stems from a lack of holistic view of an API. Understanding
which business flow an API endpoint exposes and how sensitive that
business flow is is essential in preventing this vulnerability. An API endpoint
is vulnerable to this risk if it exposes a sensitive business flow, without
appropriately restricting access to it.
• An attacker can reserve all the available slots for a given service and
prevent other users from using the system.
This type of attack is notoriously hard to detect and protect against. Attacks
in this category derive from a series of requests, in which each individual
request is entirely legitimate. This attack can be detected only with a security
architecture that can look at a series of API requests over time, which
depends on cloud-scale storage of API traffic. Proxy architectures like a WAF
or short analysis windows such as on-premise API security solutions cannot
catch this type of attack.
Airline Company
A good example of how an attacker could exploit an Unrestricted Access to
Sensitive Business Flows vulnerability would be by booking 90% of the seats
on a flight online, taking advantage of the fact that the airline would charge
no cancellation fee.
The attacker could then cancel all tickets simultaneously at no expense just a
few days before the flight date, forcing the airline to put the tickets back on
sale at a discounted price in order to fill the flight. The malicious user would
then be able to buy a ticket at a much cheaper price, benefitting from the
discounted price and causing financial damage to the airline.
Server Side Request Forgery (SSRF) can occur when a user-controlled URL
is passed over an API and is honored and processed by the back-end server.
The risk for the environment materializes if the back-end server tries to
connect to the user-supplied URL, which opens the door for SSRF.
• The back-end server links to internal services that an attacker would not
otherwise be able to access, increasing the attack surface and allowing
for more chained attack paths.
What does Server Side Request Forgery (SSRF) look like in real life?
LEGO
Research published by Salt Labs in December 2022 found that it was
possible to gain access to the internal network resources of a major LEGO-
owned website, which could potentially compromise the whole security
infrastructure at this web service.
Salt Labs’ findings show that the security vulnerabilities found at LEGO’s
online services could have allowed an attacker to manipulate service users to
gain complete control over their accounts, leak PII and other sensitive data
stored internally by the service and gain access to internal production data,
which could lead to full compromise of the company’s internal servers.
The issues were disclosed to the security team at the LEGO Group and
further testing showed that the issues have since been resolved.
During their reconnaissance phase, attackers can use security flaws to learn
about the application and API components. Specific faults, such as stack
trace problems, can reveal private user information and system specifics
that can help an attacker locate exploitable technologies, such as out-of-
date or improperly configured web and application servers, during their
reconnaissance phase. Attackers often use misconfigurations as a launching
pad for assaults on APIs, like in the case of an authentication bypass brought
on by improperly configured access control systems.
Although there are many automated tools available to find and exploit
common or known misconfigurations like unused services or outdated
settings, where you find them in the technology stack varies widely. Widely
used vulnerability scanners can only check a running server for published
software flaws and known vulnerabilities, which are typically listed as CVE
IDs. They do not, however, give a complete picture because errors can occur
in the underlying code, in dependence on outside parties, or in interactions
with other enterprise architecture. Thus, organizations frequently use a flurry
of security testing tools when constructing pipelines in order to catch as
much as they can before the production release.
IBM Cloud
In December 2021, the Wiz research team discovered a serious security
misconfiguration in IBM’s cloud infrastructure platform. The vulnerability
allowed Wiz researchers to access sensitive information, including API keys
and passwords of IBM Cloud users who had used the affected service.
The security flaw was caused by an insecure default setting in a widely used
open-source software package called “etcd,” which was used by IBM Cloud
to manage its Kubernetes clusters. This misconfiguration allowed anyone with
access to the internet to access and download the entire database containing
the credentials of all IBM Cloud customers who used the affected service.
Capital One
In 2019, Capital One suffered a chained attack, for which the primary vector
was a misconfigured WAF. The WAF was not appropriately configured for
Capital One’s AWS environment and an attacker was able to bypass the WAF’s
content inspection and message filtering using a well-crafted injection that
targeted the backend AWS cloud metadata service.
Security tools often do not monitor or defend unknown APIs, also known
as shadow APIs, and abandoned APIs, also known as zombie APIs. Even
well-known API endpoints may have shadow parameters or unspecified or
undocumented functionality. These APIs and the infrastructure that supports
them are frequently vulnerable to attacks because of this.
Optus
In September 2022, media reports indicated that the second largest
telecommunications company in Australia, Optus, had suffered a data
breach caused by a security vulnerability in one of the company’s APIs and
resulting in the exposure of 11.2 million customer records, including personal
identifiable information. The API targeted by the attackers was used to
manage customer accounts, and the vulnerability allowed unauthorized
access to sensitive information, including names, addresses, and phone
numbers.
Log4Shell
The Log4Shell incident made headlines in December 2021. This critical
vulnerability allowed users to run arbitrary code on almost every web service
using the very popular Apache Log4j logging library, potentially leading to full
control of the system.
The vulnerability behind the attack was caused by the unsafe consumption
of APIs in Log4j, specifically the ability to deserialize user-supplied data
without proper validation. Attackers could exploit this vulnerability by sending
requests containing malicious code that could then be executed on the
server.
Thanks to the widespread use of the affected logging library, this high-profile
attack highlighted the importance of properly consuming APIs in software
development and the need to validate and sanitize user input, especially
when deserializing data.
Fishpig
In September 2022, eCommerce malware detection platform Sansec
discovered that Fishpig had been hacked. The attack targeting the popular
Magento-Wordpress integrations’ vendor consisted in injecting malware code
into License.php which is normally used to validate a Fishpig license. This
meant that when a Magento staff user visited the Fishpig control panel in the
Magento backend, the malware downloaded a Linux binary that looked like
a license asset, but was actually a Rekoobe trojan that granted administrator
store access to the hackers.
Shortly after the attack was made public, Fishpig acknowledged the incident
and published a status page recommending that customers upgraded or
reinstalled all FishPig modules to ensure all extensions were secured.
How can Salt protect your APIs against the OWASP API
Security Top 10 threats?
With API attacks on the rise, organizations need to take a new approach
to API security. Traditional security tools that use only authentication,
authorization and encryption to protect web applications are not enough to
protect APIs against the OWASP Top 10 vulnerabilities, and API gateways and
WAFs can do very little to stop increasingly sophisticated attacks. It’s also
important to remember that there are elements of API security that can’t be
addressed in code or even tested for and validated prior to deployment. Many
elements of an API attack are only revealed in runtime.
The Salt Security API Protection Platform secures the APIs at the heart
of today’s complex and widespread application ecosystem. The platform
collects API traffic across the whole application landscape, making use of
big data, AI, and ML to discover all APIs and their exposed data, stop attacks
during the reconnaissance stage and eliminate vulnerabilities at the source.
Salt enables today’s organizations to do three key things to protect their APIs
throughout their entire lifecycle:
Salt Security protects the APIs that form the core of every modern application. Its patented API
Protection Platform is the only API security solution that combines the power of cloud-scale big data
Request a
and time-tested ML/AI to detect and prevent API attacks. By correlating activities across millions of demo today!
APIs and users over time, Salt delivers deep context with real-time analysis and continuous insights
for API discovery, attack prevention, and shift-left practices. Deployed in minutes and seamlessly info@salt.security
integrated within existing systems, the Salt platform gives customers immediate value and protection,
so they can innovate with confidence and accelerate their digital transformation initiatives. www.salt.security
EB-OWASP-06062023
Securing your
Innovation.