High severity7.5NVD Advisory· Published Sep 6, 2017· Updated May 13, 2026
CVE-2015-7294
CVE-2015-7294
Description
ldapauth-fork before 2.3.3 allows remote attackers to perform LDAP injection attacks via a crafted username.
Affected packages
Versions sourced from the GitHub Security Advisory.
| Package | Affected versions | Patched versions |
|---|---|---|
ldapauth-forknpm | < 2.3.3 | 2.3.3 |
ldapauthnpm | >= 0 | — |
Affected products
1- cpe:2.3:a:ldapauth-fork_project:ldapauth-fork:*:*:*:*:*:node.js:*:*Range: <2.3.3
Patches
13feea43e2436Sanitize user input
2 files changed · +16 −1
CHANGES.md+4 −0 modified@@ -1,5 +1,9 @@ # node-ldapauth-fork Changelog +## 2.3.3 + +- [issue #20] Sanitize user input + ## 2.3.2 - [issue #19] Added messages to options asserts
lib/ldapauth.js+12 −1 modified@@ -219,6 +219,17 @@ LdapAuth.prototype._search = function (searchBase, options, callback) { }); }; +// https://tools.ietf.org/search/rfc4515#section-3 +var sanitizeInput = function (username) { + return username + .replace(/\*/g, '\\2a') + .replace(/\(/g, '\\28') + .replace(/\)/g, '\\29') + .replace(/\\/g, '\\5c') + .replace(/\0/g, '\\00') + .replace(/\//g, '\\2f'); +}; + /** * Find the user record for the given username. * @@ -233,7 +244,7 @@ LdapAuth.prototype._findUser = function (username, callback) { return callback("empty username"); } - var searchFilter = self.opts.searchFilter.replace(/{{username}}/g, username); + var searchFilter = self.opts.searchFilter.replace(/{{username}}/g, sanitizeInput(username)); var opts = {filter: searchFilter, scope: self.opts.searchScope}; if (self.opts.searchAttributes) { opts.attributes = self.opts.searchAttributes;
Vulnerability mechanics
Generated by null/stub on May 9, 2026. Inputs: CWE entries + fix-commit diffs from this CVE's patches. Citations validated against bundle.
References
9- github.com/vesse/node-ldapauth-fork/commit/3feea43e243698bcaeffa904a7324f4d96df60e4nvdPatchThird Party AdvisoryWEB
- github.com/advisories/GHSA-82mg-x548-gq3jghsaADVISORY
- github.com/vesse/node-ldapauth-fork/issues/21nvdThird Party AdvisoryWEB
- nvd.nist.gov/vuln/detail/CVE-2015-7294ghsaADVISORY
- www.openwall.com/lists/oss-security/2015/09/18/4ghsaWEB
- www.openwall.com/lists/oss-security/2015/09/18/8nvdMailing ListVDB EntryWEB
- www.openwall.com/lists/oss-security/2015/09/21/2nvdMailing ListVDB EntryWEB
- www.npmjs.com/advisories/18ghsaWEB
- www.npmjs.com/advisories/19ghsaWEB
News mentions
0No linked articles in our index yet.