CVE-2025-55152: Oak Server ReDoS Vulnerability in x-forwarded-proto and x-forwarded-for Headers

@oakserver/oak Updated 02 Oct 2025

Summary

12/08/2025
No i
Moderate
5.3

CVE-2025-55152: Oak Server has ReDoS in x-forwarded-proto and x-forwarded-for headers. Affects @oakserver/oak versions < 14.1.0. No fix is published. How to fix ↓

Free scan

Check if this vulnerability affects your application

Upload a manifest or SBOM and we'll show whether you're affected, plus every other risky package in the same scan.

Check my app free

No signup required · Results in about 60 seconds

Upload your dependency manifest or SBOM

Drag & drop your file here or

Java Javascript PHP Python Go Rust Ruby Dart C/C++ Elixir CycloneDX SPDX

Upload a supported dependency manifest or SBOM. No installation or source-code access required.

See supported files and SBOM formats
SBOM sbom.json · bom.json · bom.xml · *.spdx.json · *.cdx.json · *.cdx.xml
Java pom.xml · gradle.lockfile · buildscript-gradle.lockfile
Javascript package-lock.json · yarn.lock · pnpm-lock.yaml
PHP composer.lock
Python poetry.lock · requirements.txt · Pipfile.lock
Go go.mod
Rust Cargo.lock
Ruby Gemfile.lock
Dart pubspec.lock
C/C++ conan.lock
Elixir mix.lock
Enter your work email to receive your report link.

Verify your email to view the full report and start 30 days of continuous monitoring. No credit card required.

Sponsored Devnack Your last release was probably never penetration tested Manual testing by engineers who build software, not an auditor's checklist. Trusted by teams at Swift and Google Talk to Devnack

Background

The @oakserver/oak package is a middleware framework for building web applications in Deno. It provides a robust set of features for handling HTTP requests and responses, routing, and middleware integration. However, it is vulnerable to a Regular Expression Denial of Service (ReDoS) attack when processing specially crafted values in the x-forwarded-proto and x-forwarded-for headers, which can significantly degrade server performance.

Vulnerability Detail

The vulnerability arises from the way the Oak server processes the x-forwarded-proto and x-forwarded-for headers. Attackers can exploit this by sending requests with specially crafted header values that cause the server to consume excessive CPU resources, leading to a slowdown or denial of service. The vulnerable code can be found in request.ts at specific lines, where the headers are parsed without adequate validation, allowing for potential abuse.

How To Fix

No fixed version is published for this vulnerability.

Tip — Not sure whether your app is affected? Vulert can check the versions your app actually runs. Scan free →

Workaround

As a temporary workaround, you can implement validation on the x-forwarded-proto and x-forwarded-for headers in your application to limit their length and prevent excessively long values from being processed. For example, you can add middleware to check the header lengths before processing requests:

app.use((ctx, next) => {
    const maxHeaderLength = 100; // Set a maximum length for headers
    if (ctx.request.headers.get('x-forwarded-proto')?.length > maxHeaderLength ||
        ctx.request.headers.get('x-forwarded-for')?.length > maxHeaderLength) {
    ctx.response.status = 400; // Bad Request
        ctx.response.body = 'Header value too long';
    return;
    }
    return next();
});

Conclusion

The CVE-2025-55152 vulnerability in the @oakserver/oak package poses a significant risk by allowing attackers to exploit header values, leading to potential denial of service. It is crucial to update to the patched version or implement workarounds to mitigate the risk.

See every vulnerability recorded for @oakserver/oak →

Share this vulnerability

FAQ

CVE-2025-55152 is a vulnerability in the @oakserver/oak package that allows attackers to exploit the x-forwarded-proto and x-forwarded-for headers, leading to potential denial of service.

You can use Vulert, which monitors open-source vulnerabilities in your software. By checking your package-lock.json file, you can determine if your application is affected by this vulnerability.

The vulnerability can lead to significant slowdowns in server performance, potentially causing denial of service for legitimate users.

You can update the package by running the command: npm update @oakserver/oak in your project directory.

Yes, you can implement validation on the x-forwarded-proto and x-forwarded-for headers to limit their length and prevent excessively long values from being processed.

Related vulnerabilities

Recent vulnerabilities recorded for @oakserver/oak.

How To Fix

No fixed version is published for this vulnerability.

Tip — Not sure whether your app is affected? Vulert can check the versions your app actually runs. Scan free →

Subscribe to Vulert on Telegram
Daily digest of new CVEs, critical and high severity, affected packages and fixes — plus a weekly roundup.
Join the channel →
Help improve this record
Report an issue or send feedback