CVE-2024-57177: Server-Side Template Injection Vulnerability in @perfood/couch-auth

@perfood/couch-auth Updated 18 Dec 2025

Summary

10/02/2025
No i
Moderate
4.3

CVE-2024-57177: CouchAuth has a Server-Side Template Injection vulnerability in its email functionality. Affects @perfood/couch-auth versions < 0.21.2. 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 @perfood/couch-auth package is an NPM library designed for managing authentication in applications using CouchDB. It provides functionalities such as user registration, login, and email verification. However, versions up to 0.21.2 are susceptible to a security flaw that can be exploited through crafted host headers, potentially compromising server integrity.

Vulnerability Detail

A Server-Side Template Injection (SSTI) vulnerability exists in the @perfood/couch-auth package, specifically in its email functionality. This vulnerability arises from improper handling of host headers in email change confirmation requests. An attacker can exploit this flaw by sending a specially crafted host header, which may allow them to execute limited commands on the server or leak sensitive server-side information. The vulnerability is classified under CWE-1336 and CWE-74, indicating risks related to injection and improper input validation.

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

If immediate upgrading is not feasible, consider implementing input validation to sanitize host headers before processing them in your application. This can help mitigate the risk of exploitation until the package is updated.

Conclusion

The @perfood/couch-auth package has a critical Server-Side Template Injection vulnerability that can be exploited through crafted host headers. It is crucial to update to the latest version to mitigate this risk. Additionally, using tools like Vulert can help monitor your applications for vulnerabilities in real-time.

See every vulnerability recorded for @perfood/couch-auth →

Share this vulnerability

FAQ

Server-Side Template Injection (SSTI) is a vulnerability that allows an attacker to execute arbitrary code on the server by injecting malicious template code into a web application.

You can check if your application is affected by using Vulert, which monitors open-source vulnerabilities in your software. Visit Vulert Scanner to analyze your package-lock.json without needing to sign up.

Exploitation of this vulnerability can lead to unauthorized command execution or leakage of sensitive information from the server, posing significant security risks.

Yes, a patch is available in version 0.21.3 of the @perfood/couch-auth package. It is recommended to update to this version or later.

If you cannot update the package right away, implement input validation to sanitize host headers as a temporary workaround to reduce the risk of exploitation.

Related vulnerabilities

Recent vulnerabilities recorded for @perfood/couch-auth.

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