Skip to content

Commit 01e3988

Browse files
committed
JS: Mark what seems to be missing alerts for fflate
The query doesn't seem to model or even mention fflate. Not sure if the library is safe or just not modeled.
1 parent b9fa856 commit 01e3988

File tree

1 file changed

+9
-8
lines changed
  • javascript/ql/test/query-tests/Security/CWE-522-DecompressionBombs

1 file changed

+9
-8
lines changed

javascript/ql/test/query-tests/Security/CWE-522-DecompressionBombs/fflate.js

Lines changed: 9 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -9,14 +9,15 @@ app.listen(3000, () => {
99
});
1010

1111
app.post('/upload', async (req, res) => {
12-
fflate.unzlibSync(new Uint8Array(req.files.CompressedFile.data)); // $ Alert
13-
fflate.unzip(new Uint8Array(new Uint8Array(req.files.CompressedFile.data)));
14-
fflate.unzlib(new Uint8Array(req.files.CompressedFile.data));
15-
fflate.unzlibSync(new Uint8Array(req.files.CompressedFile.data));
16-
fflate.gunzip(new Uint8Array(req.files.CompressedFile.data));
17-
fflate.gunzipSync(new Uint8Array(req.files.CompressedFile.data));
18-
fflate.decompress(new Uint8Array(req.files.CompressedFile.data));
19-
fflate.decompressSync(new Uint8Array(req.files.CompressedFile.data));
12+
// Not sure if these are vulnerable, but currently not modeled
13+
fflate.unzlibSync(new Uint8Array(req.files.CompressedFile.data)); // $ MISSING: Alert
14+
fflate.unzip(new Uint8Array(new Uint8Array(req.files.CompressedFile.data))); // $ MISSING: Alert
15+
fflate.unzlib(new Uint8Array(req.files.CompressedFile.data)); // $ MISSING: Alert
16+
fflate.unzlibSync(new Uint8Array(req.files.CompressedFile.data)); // $ MISSING: Alert
17+
fflate.gunzip(new Uint8Array(req.files.CompressedFile.data)); // $ MISSING: Alert
18+
fflate.gunzipSync(new Uint8Array(req.files.CompressedFile.data)); // $ MISSING: Alert
19+
fflate.decompress(new Uint8Array(req.files.CompressedFile.data)); // $ MISSING: Alert
20+
fflate.decompressSync(new Uint8Array(req.files.CompressedFile.data)); // $ MISSING: Alert
2021

2122

2223
fflate.unzlibSync(new Uint8Array(req.files.CompressedFile.data), {

0 commit comments

Comments
 (0)