CVE-2023-50249
Executive Summary
CVE-2023-50249 is a Regular Expression Denial of Service (ReDoS) vulnerability in Sentry's Astro SDK, affecting versions 7.78.0 through 7.86.0. The flaw allows an unauthenticated remote attacker to trigger excessive CPU consumption on the server by submitting specially crafted input that exploits an inefficient regular expression pattern. Successful exploitation results in denial of service, rendering the affected application unresponsive. The vendor has released a patched version (7.87.0) that resolves the issue.
This record — and 170,000+ others — are available via the ValtersIT API. One endpoint replaces five: NVD + GitHub CVE + CISA KEV + EPSS + Nuclei + Exploit-DB, unified.
No signup required
Technical Analysis
Vulnerability Class
CVE-2023-50249 belongs to the ReDoS (Regular Expression Denial of Service) vulnerability class. ReDoS occurs when a regular expression contains a pattern with catastrophic backtracking behavior — typically involving nested quantifiers (e.g., (a+)+, (a|a)*) or ambiguous alternations that cause the regex engine to explore an exponential number of matching paths for certain inputs.
Affected Component
The vulnerable component is the Sentry Astro SDK (@sentry/astro), an official Sentry integration for the Astro web framework. This SDK handles server-side instrumentation, error tracking, and performance monitoring. The vulnerable versions are:
- Affected range: 7.78.0 – 7.86.0
- Patched version: 7.87.0
Attack Mechanism
The NVD description specifies that "under certain conditions" the vulnerability enables an attacker to cause "excessive computation times on the server." The exact regular expression pattern and the user-controlled input field that feeds into it are not disclosed in the public description. However, based on the vulnerability class, the attack vector is:
- The SDK processes an input string (likely a URL, request header, user-agent string, or error message content).
- The input is matched against a vulnerable regular expression containing a catastrophic backtracking pattern.
- A maliciously crafted input string causes the regex engine to attempt an exponential number of backtracking steps.
- CPU consumption spikes, and the server becomes unresponsive to legitimate requests.
Affected Attack Surface
Since the ReDoS is in an SDK used within the Astro framework, the attack surface includes:
- HTTP request handling: Malicious requests sent to any endpoint of an Astro application using the SDK.
- Input reflection: If the SDK logs or processes user-controlled data (e.g., query parameters, route parameters, request paths) through the vulnerable regex.
- Server-side execution: The DoS affects the server runtime, not just the client-side bundle.
Technical Detail Level
The public disclosure lacks specifics about the exact regex pattern, the triggering input format, or the code path. This is consistent with the vendor's limited disclosure to allow users to patch before full technical details are published. Security teams should treat any user-controllable string processed by the SDK as a potential trigger vector.
Exploitation Scenarios
Note: No public PoC is available at the time of writing, and the exact trigger string is undisclosed. The following attack chain is inferred from the ReDoS vulnerability class and the CNA/NVD description.
Step 1: Reconnaissance / Target Identification
An attacker identifies Astro-based web applications that use Sentry integration. Reconnaissance techniques include:
- Scanning for HTTP responses containing Astro-specific headers or page signatures.
- Detecting Sentry SDK presence via client-side JavaScript files (e.g.,
@sentry/browserbundle references). - Fingerprinting the SDK version via exposed error messages, Sentry DSN URLs, or distinctive API responses.
Step 2: Flaw Triggering
The attacker crafts an HTTP request containing a malicious string in a field that the SDK processes. Candidate fields based on typical SDK behavior:
- HTTP request path or query parameters
- User-Agent or Referer headers
- Error messages submitted to the Sentry error-reporting endpoint
The string is specifically designed to trigger catastrophic backtracking in the vulnerable regex pattern.
Step 3: Payload Execution
The attacker sends the crafted request. Without PoC details, we can only describe the generic ReDoS payload characteristics:
- Strings with repeated characters that cause ambiguity in regex matching (e.g., long sequences of
afollowed by a single non-matching character). - Nested repetition constructs that force the regex engine to explore all possible match combinations.
Each malicious request consumes significant CPU time. An attacker can amplify the effect by sending multiple concurrent requests.
Step 4: Post-Exploitation Impact
Successful exploitation results in:
- Server CPU exhaustion: The Node.js event loop is blocked, halting all request processing.
- Denial of service: Legitimate users experience timeouts, slow responses, or complete unavailability.
- Potential cascading failures: Health check failures may trigger load balancer rebalancing, causing additional instability.
Impact Assessment
Business Impact
- Availability impact: High — CVSS 3.1 base score 7.5 with
A:H(Availability: High). The vulnerability targets availability exclusively; confidentiality and integrity are unaffected. - Service disruption: An attacker can knock an Astro application offline with minimal effort and no authentication.
- Reputation damage: Prolonged downtime of customer-facing applications erodes trust.
Affected Systems
- All Astro applications using
@sentry/astroversions 7.78.0 through 7.86.0. - Server-side rendering (SSR) deployments are at highest risk because the vulnerable regex executes on the Node.js server runtime.
- Static site deployments that only use client-side Sentry features may be less exposed, but any server-side instrumentation is vulnerable.
Blast Radius
- Single application outage: Attack affects only the specific server processing the malicious request.
- Resource exhaustion: CPU-bound DoS can slow co-hosted services if the Node.js process is not isolated via containerization or worker threads.
- EPSS context: Score of 0.00785 (52.8th percentile) indicates moderate exploit probability in the wild, but this can change rapidly once a PoC is published.
Detection Guidance
Sigma Rule
title: Sentry Astro SDK ReDoS Exploitation Attempt
id: 5c8c8d6f-4a4e-4e0f-9a1b-1e5e6f7a8b9c
status: experimental
description: Detects potential ReDoS attempts against Sentry Astro SDK by flagging requests with abnormally long input strings and high response times.
references:
- https://nvd.nist.gov/vuln/detail/CVE-2023-50249
tags:
- attack.t1498
- cve.2023.50249
- cwe.1333
logsource:
category: webserver
product: nodejs
detection:
selection:
http.response.status_code: 200
http.request.length: '> 1000'
timeframe: 5m
condition: selection | count() by src_ip > 20
level: high
falsepositives:
- Legitimate large payloads (file uploads, long form submissions)
- Automated crawlers sending many large requests
YARA Rule
rule CVE_2023_50249_Sentry_Astro_ReDoS
{
meta:
author = "Valters IT Security"
description = "Detects suspicious payload patterns that may trigger ReDoS in Sentry Astro SDK"
cve = "CVE-2023-50249"
date = "2024-01-15"
reference = "https://nvd.nist.gov/vuln/detail/CVE-2023-50249"
strings:
$sentry_sdk = "@sentry/astro" ascii wide
$sentry_ver = "sentry-astro" ascii wide noCase
$long_repeat = /[a-zA-Z0-9]{500,}/ ascii
$nested_pattern = /([a-z]+\+)+[a-z]+\$/ ascii
condition:
($sentry_sdk or $sentry_ver) and ($long_repeat or $nested_pattern)
}
Suricata IDS Rule
alert http any any -> $HOME_NET any (msg:"CVE-2023-50249 - Sentry Astro SDK ReDoS Attempt"; sid:30050249; rev:1; metadata:cve CVE-2023-50249; flow:established,to_server; content:"@sentry"; http.uri; content:"astro"; http.uri; pcre:"/(?:(?:[a-zA-Z0-9]\+\?){5,})/"; threshold:type both, track by_src, count 10, seconds 60; reference:url,nvd.nist.gov/vuln/detail/CVE-2023-50249; classtype:attempted-dos; priority:1;)
Elastic Detection
sequence by source.ip with maxspan=5m
[network where event.action == "http_request" and
network.direction == "ingress" and
url.path contains "@sentry" or url.path contains "astro"] with runs=5
[network where event.action == "http_response" and
network.direction == "egress" and
http.response.status_code == 200 and
duration.us > 5000000] with runs=3
Splunk SPL Query
index=web sourcetype=access_combined
| where like(uri, "%@sentry%") OR like(uri, "%astro%")
| eval req_length = len(_raw)
| where req_length > 1000
| stats count by src_ip, uri
| where count > 20
| eval risk_score = count * 5
| table _time, src_ip, uri, count, risk_score
| sort - risk_score
Wazuh OSSEC Rule
<group name="sentry_redos,">
<rule id="100249" level="12">
<decoded_as>json</decoded_as>
<field name="url">\.astro\.</field>
<field name="url">sentry</field>
<regex>onerror="(.*?)"</regex>
<description>CVE-2023-50249: Potential Sentry Astro SDK ReDoS attack detected</description>
<group>attack.t1498,</group>
<mitre>
<id>T1498</id>
</mitre>
<var name="url">%url</var>
<match>sentry.*astro|astro.*sentry</match>
<options>no_full_log</options>
</rule>
</group>
Mitigation & Patch Guidance
Patch Confidence: 2/4 — CLAIMED — The CNA (Sentry) claims a patch exists in version 7.87.0; this has not been independently confirmed by third-party testing.
Immediate Mitigations
- Upgrade immediately: Update
@sentry/astroto version 7.87.0 or later. This is the only confirmed remediation.npm install @sentry/astro@^7.87.0 - Apply rate limiting: Implement rate limiting at the reverse proxy or application level to constrain the number of requests from a single IP.
- Input length restrictions: Reject or truncate HTTP request fields (URLs, headers) exceeding reasonable lengths (e.g., > 1KB).
- Resource isolation: If immediate patching is not possible, isolate the Astro application in a container with strict CPU limits to prevent resource exhaustion from affecting co-hosted services.
- WAF rules: Deploy a Web Application Firewall rule to block requests with extremely long, repetitive URI or header patterns.
Patch / Upgrade Steps
- Verify current version:
npm list @sentry/astro - Upgrade to the latest patched version:
npm install @sentry/astro@latest(or explicitly^7.87.0) - Rebuild and redeploy your Astro application.
- Verify the SDK version in the production bundle.
- Notify the CNA if the patch is independently confirmed based on your testing.
Long-Term Hardening
- Security scanning: Integrate
npm auditand tools like Snyk or Trivy into CI/CD to detect ReDoS-prone dependencies. - Regex hygiene: Conduct periodic code reviews of regex patterns in your codebase; use tools like
safe-regexto detect catastrophic backtracking patterns. - Input validation: Never pass raw user input directly into regex operations without length limits or sanitization.
- Monitoring: Set up CPU usage alerts and request-latency anomaly detection to catch ReDoS attacks early.
- Patching policy: Maintain a SLA for applying security patches to SDK dependencies within 48 hours of disclosure.
References
- NVD Entry: https://nvd.nist.gov/vuln/detail/CVE-2023-50249
- Sentry Advisory (CNA): https://github.com/getsentry/sentry-javascript (Release notes for version 7.87.0)
- Sentry Astro SDK GitHub: https://github.com/getsentry/sentry-javascript/tree/master/packages/astro
- CWE-1333 Reference: https://cwe.mitre.org/data/definitions/1333.html
- CISA KEV: Not listed — no known exploitation in the wild as of this report.
Threat Actor Activity: No known threat actor campaigns or exploit-in-the-wild evidence have been reported. The EPSS score (0.00785, 52.8th percentile) suggests moderate probability of exploitation but no confirmed malicious use as of the report date.
Report generated by ValtersIT Cyber Intelligence Division. This report is based on publicly available CVE data and vulnerability class analysis. Specific exploit details are not publicly disclosed by the vendor at this time.
What is this? Security researchers use these exact search queries on Shodan.io (a search engine for internet-connected devices) to find vulnerable systems globally. You can copy these dorks to see if your organization's IP space is exposed.
💣 PoC CODE AVAILABLE
Exploit code for this CVE is tracked in our database.
Access poc_code via API Pro.