High severity8.8NVD Advisory· Published Dec 10, 2024· Updated Apr 15, 2026
CVE-2024-55500
CVE-2024-55500
Description
Cross-Site Request Forgery (CSRF) in Avenwu Whistle v.2.9.90 and before allows attackers to perform malicious API calls, resulting in the execution of arbitrary code on the victim's machine.
Affected packages
Versions sourced from the GitHub Security Advisory.
| Package | Affected versions | Patched versions |
|---|---|---|
whistlenpm | <= 2.9.90 | — |
Patches
11 file changed · +32 −39
biz/webui/lib/index.js+32 −39 modified@@ -291,47 +291,17 @@ app.use(function(req, res, next) { if (req.headers.host !== 'rootca.pro') { return next(); } - var type = 'crt'; - if (!req.path.indexOf('/cer')) { - type = 'cer'; + var type = 'cer'; + if (!req.path.indexOf('/crt')) { + type = 'crt'; } else if (!req.path.indexOf('/pem')) { type = 'pem'; } res.download(getRootCAFile(), 'rootCA.' + type); }); -function checkAllowOrigin(req) { - if (config.allowAllOrigin || - req.headers['sec-fetch-site'] === 'same-origin' || - ALLOW_CROSS_URLS.indexOf(req.path) !== -1) { - return true; - } - var host = req.headers['x-whistle-origin-host']; +function isAllowHost(host) { var list = config.allowOrigin; - if (!host) { - host = req.headers.origin; - if (!host || typeof host !== 'string') { - return true; - } - var index = host.indexOf('://'); - if (index !== -1) { - host = host.substring(index + 3); - } - host = util.parseHost(host)[0]; - if (!host) { - return false; - } - if (!list) { - if (config.isWebUIHost(host)) { - req._isWebUIHost = true; - return true; - } - return false; - } - } - if (host === '*') { - return false; - } if (list) { for (var i = 0, len = list.length; i < len; i++) { var h = list[i]; @@ -340,18 +310,41 @@ function checkAllowOrigin(req) { } } } - if (config.isWebUIHost(host)) { - req._isWebUIHost = true; +} + +function checkInternalPath(req) { + if (config.allowAllOrigin || ALLOW_CROSS_URLS.indexOf(req.path) !== -1) { return true; } - return false; + var host = req.headers['x-whistle-origin-host']; + return !host || isAllowHost(host); +} + +function checkAllowOrigin(req) { + var host = req.headers.origin; + if (!host || typeof host !== 'string' || + req.headers['sec-fetch-site'] === 'same-origin') { + return false; + } + if (config.allowAllOrigin) { + return true; + } + if (!config.allowOrigin) { + return false; + } + var index = host.indexOf('://'); + if (index !== -1) { + host = host.substring(index + 3); + } + host = util.parseHost(host)[0]; + return host && isAllowHost(host); } function cgiHandler(req, res) { - if (UP_PATH_REGEXP.test(req.path) || !checkAllowOrigin(req)) { + if (UP_PATH_REGEXP.test(req.path) || !checkInternalPath(req)) { return res.status(403).end('Forbidden'); } - if (!req._isWebUIHost && req.headers.origin) { + if (checkAllowOrigin(req)) { res.setHeader('access-control-allow-origin', req.headers.origin); res.setHeader('access-control-allow-credentials', true); }
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
5- github.com/advisories/GHSA-gg6x-448q-pqqmghsaADVISORY
- nvd.nist.gov/vuln/detail/CVE-2024-55500ghsaADVISORY
- github.com/avwo/whistle/commit/d1b8ca275dc4e453bd2efed392c0fd4b92f73cdfnvdWEB
- www.sonarsource.com/blog/never-underestimate-csrf-why-origin-reflection-is-a-bad-ideaghsaWEB
- www.sonarsource.com/blog/never-underestimate-csrf-why-origin-reflection-is-a-bad-idea/nvd
News mentions
0No linked articles in our index yet.