Software Securityhome
Fix a findingSearch
Tag

Denial of service and resource limits

14 guides tagged Denial of service and resource limits, grouped by topic, with the SDLC phase and role each is written for.

SDLC phases
Roles

Application security

6 guides
Guide · Application security

Convert untrusted office documents and PDFs in an isolated parser

DOCX, XLSX and ODF files are ZIP archives of XML, and PDFs can carry scripts; the converters that read them are large C and C++ programs with a long CVE history. Check the package before any parser reads it, convert each document in a container with no network, no writable root and hard limits, kill it at a deadline, and re-render to pixels when people will open the result.

Design, Development · Developers, AppSec engineers, Platform engineers and SREs

Guide · Application security

Secure WebRTC signaling, TURN relays and media servers

WebRTC encrypts media, but signaling decides whose keys you trust and TURN relays wherever it is allowed. Authorize every signaling message, mint short-lived TURN credentials, deny internal addresses and harden media servers.

Design, Development · Developers, Platform engineers and SREs

Guide · Application security

Parse bounded JSON and XML into an explicit application schema

Separate parser capabilities from schema rules, reject ambiguous and coercible inputs, and implement the boundary in a complete Python project.

Development · Developers, AppSec engineers

Guide · Application security

Prevent business-logic flaws with server-side invariants

Recompute prices on the server, run workflows as state machines, build reset links from configuration, limit valuable flows, and turn each business rule into an invariant that the database and the tests both check.

Planning, Design, Testing · Developers, AppSec engineers

Guide · Application security

Validate input safely and prevent regex denial of service

Find and fix exponential and quadratic regex backtracking with measured examples, choose linear-time engines or timeouts, and build allowlist validation that decodes once and rejects type confusion and parameter pollution.

Development · Developers, AppSec engineers

Guide · Application security

Consume third-party APIs safely (OWASP API10:2023)

Treat every upstream and third-party API response as untrusted input: validate it against a schema, set connect and read timeouts, cap the response size, refuse to follow redirects blindly, keep TLS verification on, and scope the credentials you hold for each provider.

Design, Development · Developers, AppSec engineers

Runtime, cloud & APIs

5 guides

AI security

3 guides

Practice

Browser lab · Practitioner · 25–40 min

Business logic lab: Price an order without trusting the client

A checkout trusts the price and quantity each cart line sends, adds every coupon code it recognizes, and never limits redemptions. Customers can choose their price, order negative quantities and stack discounts. Repair the pricing function so every amount comes from server data and every coupon rule holds.

Browser lab · Practitioner · 25–40 min

XXE lab: Parse an uploaded invoice without resolving external entities

An invoice importer parses uploaded XML with a parser that resolves external entities, so a crafted DOCTYPE reads a local file into the response (XXE). Repair parse_invoice so the parser never resolves external entities, loads no DTD and makes no network request.

Browser lab · Practitioner · 25–40 min

Pickle deserialization lab: Load a session token without pickle

A session loader parses JSON but falls back to pickle for “legacy” tokens, so a crafted pickle runs code when it is loaded. Repair load_token to parse JSON only and validate it against a fixed schema, and leave no path that unpickles untrusted bytes.

Fix card · CWE-1333

Regular-expression denial of service (ReDoS)

A regular-expression denial of service happens when untrusted input is matched against a pattern whose worst-case running time is super-linear - usually from a nested quantifier such as (X+)+, an overlapping alternation such as (a|aa)+, or a quantified group followed by something that can fail.

Fix card · CWE-770, CWE-400

Unbounded resource consumption

Unbounded resource consumption happens when a request can make the server spend without limit: an unbounded request body, a batch or page size the caller chooses, or an endpoint with no rate limit, so one client exhausts memory, CPU or the connection pool.

All tags, lifecycle stages and roles

Find your next answer

Type to search. Search runs in your browser.

Searches run in your browser, but the host can infer them from the index files they load. The address shows your search so you can bookmark or share it.