CVE-2024-57177: @perfood/couch auth CouchAuth Has A Server-Side Template Vulnerability
MODERATECVE-2024-57177 is a MODERATE (CVSS 4.3) couchauth has a server-side template vulnerability (CWE-1336: Improper Neutralization of Special Elements Used in a Template Engine) affecting @perfood/couch auth libraries in the npm ecosystem. The issue involves couchauth has a server-side template injection vulnerability in its email functionality. Remediation is available in the latest vendor maintenance releases.
CVE-2024-57177 at a Glance
Security Impact
CVSS: 4.3
The security impact metrics below are parsed directly from the CVSS v3.1 vector string (CVSS:3.1/AV:P/AC:L/PR:N/UI:N/S:U/C:L/I:L/A:L).
How to Fix CVE-2024-57177
To remediate this vulnerability, upgrade all affected @perfood/couch auth dependencies to a patched release. Both direct and transitive dependencies should be checked, as frameworks or security libraries may pull in vulnerable versions transitively.
npm install @perfood/couch-auth@Latest secure release
Run the following command in your project directory to verify that all resolved dependencies use the patched release:
npm ls @perfood/couch-auth
How to Check if You Are Affected
To determine whether your Node.js application is affected by CVE-2024-57177, inspect your project dependencies using npm:
npm ls @perfood/couch-auth
Analyze the terminal output to locate any version of @perfood/couch auth in your dependency tree. If any resolved version matches the vulnerable ranges listed in the table below (for example, versions earlier than the patched release), your application is affected.
Note: The npm ls @perfood/couch-auth command inspects dependencies declared in your package.json and lockfile; it does not perform automated runtime dynamic scanning.
Technical Details
Vulnerability Mechanism & Technical Analysis
This vulnerability is classified under CWE-1336: Improper Neutralization of Special Elements Used in a Template Engine, where the product uses a template engine to insert or process externally-influenced input, but it does not neutralize or incorrectly neutralizes special elements or syntax that can be interpreted as template expressions or other code directives when processed by the engine. In @perfood/couch auth, software state validation or input boundaries are circumvented during processing. Review the official source advisory statement below for specific affected components, classes, and reproduction details.
Source Advisory Statement
CVE-2024-57177 Affected @perfood/couch auth Versions
1 component(s)| Product / Package | Ecosystem | Affected Versions | Fixed Version |
|---|---|---|---|
|
@perfood/couch-auth
|
npm |
≤ 0.21.2
|
|
References
Frequently Asked Questions
What is CVE-2024-57177?
Which @perfood/couch auth versions are affected?
What version fixes CVE-2024-57177?
Is @perfood/couch-auth affected?
What is the CVSS score of CVE-2024-57177?
What CWE is associated with CVE-2024-57177?
How can I check npm dependencies for CVE-2024-57177?
Machine-readable OSV JSON
OSV v1.5 Schema
{
"schema_version" : "1.4.0",
"id" : "GHSA-r385-c5fc-x56c",
"modified" : "2025-12-18T15:30:18Z",
"published" : "2025-02-10T21:31:39Z",
"aliases" : [ "CVE-2024-57177" ],
"summary" : "CouchAuth has a Server-Side Template Injection vulnerability in its email functionality",
"details" : "A host header injection vulnerability exists in the NPM package of perfood/couch-auth <= 0.21.2. By sending a specially crafted host header in the email change confirmation request, it is possible to trigger a SSTI which can be leveraged to run limited commands or leak server-side information.",
"severity" : [ {
"type" : "CVSS_V3",
"score" : "CVSS:3.1/AV:P/AC:L/PR:N/UI:N/S:U/C:L/I:L/A:L"
} ],
"affected" : [ {
"package" : {
"ecosystem" : "npm",
"name" : "@perfood/couch-auth"
},
"ranges" : [ {
"type" : "ECOSYSTEM",
"events" : [ {
"introduced" : "0"
}, {
"last_affected" : "0.21.2"
} ]
} ]
} ],
"references" : [ {
"type" : "ADVISORY",
"url" : "https://nvd.nist.gov/vuln/detail/CVE-2024-57177"
}, {
"type" : "PACKAGE",
"url" : "https://github.com/perfood/couch-auth"
}, {
"type" : "WEB",
"url" : "https://github.com/waristea/cve-research/tree/main/CVE-2024-57177"
} ],
"database_specific" : {
"cwe_ids" : [ "CWE-1336", "CWE-74" ],
"severity" : "MODERATE",
"github_reviewed" : true,
"github_reviewed_at" : "2025-12-18T15:30:17Z",
"nvd_published_at" : "2025-02-10T20:15:41Z"
}
}