Exploit databaseDownload repository ZIP
GH-214f9eefe1d1c37ef929e97419730dd9
lxxexxbxx/cve-2026-44578
Sources for CVE-2026-44578
4 sourcesPreferred order: Exploit-DB, Metasploit, then GitHub repositories by stars. Open preferred source
Repository files7
lxxexxbxx/cve-2026-44578Revision 68a35380f648
- ↑..Parent directory
- app/
- Dockerfile
- next.config.js
- package-lock.json
- package.json
- patch-defense.js
- patch-for-lab.js
Files from this repository share one source choice. Supporting files may cover other vulnerabilities.
nextjs-app/patch-for-lab.js
JavaScript · 1,097 bytes#!/usr/bin/env node
/**
* CVE-2026-44578 재현 환경 패치
*
* resolve-routes.js의 // 정규화 체크가 absolute-form URI (http://host/path)의
* :// 를 연속 슬래시로 오인식해 단일 슬래시(http:/host/path)로 축소하는 버그를 수정.
* absolute-form URI는 정규화 대상에서 제외하여 SSRF 취약점이 정상 재현되도록 함.
*/
const fs = require('fs');
const target = 'node_modules/next/dist/server/lib/router-utils/resolve-routes.js';
let src = fs.readFileSync(target, 'utf8');
const OLD = 'if (urlNoQuery == null ? void 0 : urlNoQuery.match(/(\\\\|\\/\\/)/)) {';
const NEW = 'if ((urlNoQuery == null ? void 0 : urlNoQuery.match(/(\\\\|\\/\\/)/)) && !urlNoQuery.match(/^https?:\\/\\//)) {';
if (src.includes(OLD)) {
src = src.replace(OLD, NEW);
fs.writeFileSync(target, src);
console.log('[patch] resolve-routes.js patched successfully');
} else if (src.includes(NEW)) {
console.log('[patch] already applied, skipping');
} else {
console.error('[patch] ERROR: target string not found - Next.js version mismatch?');
process.exit(1);
}