Runtime Application Self-Protection (RASP) is a security technology that is built into or attached to an application's runtime. It instruments sensitive operations such as database queries, system commands, file access and outgoing requests, and checks with the application's own context whether untrusted input is about to change their behavior. RASP can report such attacks or block them, for example SQL injection, command injection or server-side request forgery.
What is RASP?
Runtime Application Self-Protection (RASP) moves attack detection into the running application. Classic perimeter controls look at a request before it reaches the application and decide based on its shape: does the URL or body look like an attack? RASP sits inside the process, typically as an agent or library that instruments the language runtime, and watches what the application actually does with the input.
That difference matters. A string such as ' OR 1=1 -- in a search field is only dangerous if it ends up unescaped in a SQL query. A perimeter filter has to guess; RASP can see the final query that is about to be sent to the database and recognize that user input has changed its structure. This allows precise decisions with fewer false positives, and it also covers inputs that a perimeter cannot read, such as encrypted or encoded payloads that are only decoded inside the application.
How RASP works
RASP instruments so-called sinks, the places where input becomes dangerous:
- Database calls: detection of SQL and NoSQL injection by comparing the query structure with and without user input.
- System commands: detection of command injection when input reaches a shell or process call.
- File access: detection of path traversal, such as
../../etc/passwd. - Outgoing requests: detection of server-side request forgery (SSRF), for example calls to cloud metadata endpoints or internal addresses.
- Further sinks depending on the product, for example deserialization or template rendering.
When a sink is called, RASP correlates the operation with the current request. If untrusted input changes the meaning of the operation, it can log the event, raise an alert or abort the operation, for example by throwing an exception or returning an error response. Most products offer a monitor mode that only reports and a blocking mode that stops the attack.
RASP vs. WAF vs. IAST
| Aspect | WAF | IAST | RASP |
|---|---|---|---|
| Where it runs | In front of the application | Inside the application | Inside the application |
| When | Production | Testing and QA | Production |
| Goal | Filter malicious traffic | Find vulnerabilities in code | Detect and stop exploitation |
| What it sees | Incoming request | Data flow during tests | Data flow during real requests |
A web application firewall (WAF) remains useful for broad filtering, bot traffic and volumetric abuse, often together with rate limiting. Interactive Application Security Testing (IAST) uses similar instrumentation but reports vulnerabilities to developers during testing. RASP adds protection in production, especially where vulnerabilities are not yet fixed.
Typical use cases
- Bridging the patch gap: when a new CVE affects a library that cannot be updated immediately, RASP can block exploitation attempts against the affected sink until the fix is deployed. Knowing which components run where, for example from an SBOM, helps decide where this is needed.
- Legacy applications: systems whose code is hard to change still get protection at the injection points.
- Evidence for incident response: because RASP knows the request, the payload and the affected code location, findings are concrete and easy to reproduce.
- AI applications: some products extend runtime protection to prompt injection in LLM-based features.
Limitations and trade-offs
- Language support: RASP depends on instrumenting a specific runtime. Coverage varies by language, framework and database driver.
- Overhead: checks run in the request path and add some latency. Measure it under realistic load before enabling it broadly.
- False positives: blocking in production can stop legitimate users. Start in monitor mode and enable blocking step by step.
- Not a fix: RASP reduces the risk of exploitation but does not remove the vulnerability. The code or dependency still needs to be fixed.
- Scope: logic flaws, broken access control and stolen credentials are hard to recognize at a sink and need other controls.
RASP and observability
RASP events are most useful with context. When a detected attack is recorded as part of the distributed trace of the request, teams can see which service and endpoint were targeted, which downstream calls followed and whether errors or unusual latency occurred. Mapping events to MITRE ATT&CK techniques such as T1190 (Exploit Public-Facing Application) makes them comparable with other detections in the security team.
How Obseria helps
Obseria Runtime Application Protection detects SQL injection, command injection, SSRF and prompt injection in the code path. Each attack appears as a trace with payload, target and impact, linked to the affected service and request. Detection runs in monitor mode by default, blocking can be enabled per application and attack type, and the protection runs in the existing Obseria Agent.