Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fixes #434 - Add pdf.js detection #435

Merged
merged 3 commits into from
Jun 6, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
219 changes: 200 additions & 19 deletions chrome/extension/js/generated/retire-chrome.js

Large diffs are not rendered by default.

39 changes: 39 additions & 0 deletions repository/jsrepository-master.json
Original file line number Diff line number Diff line change
Expand Up @@ -5856,6 +5856,45 @@
"func": ["MathJax.version"]
}
},
"pdf.js": {
"bowername": ["pdfjs-dist"],
"npmname": "pdfjs-dist",
"vulnerabilities": [
{
"ranges": [
{
"atOrAbove": "0",
"below": "4.2.67"
}
],
"summary": "PDF.js vulnerable to arbitrary JavaScript execution upon opening a malicious PDF",
"cwe": ["CWE-79"],
"severity": "high",
"identifiers": {
"CVE": ["CVE-2024-34342", "CVE-2024-4367"],
"githubID": "GHSA-wgrm-67xf-hhpq"
},
"info": [
"https://github.com/advisories/GHSA-wgrm-67xf-hhpq",
"https://github.com/mozilla/pdf.js/security/advisories/GHSA-wgrm-67xf-hhpq",
"https://github.com/mozilla/pdf.js/pull/18015",
"https://github.com/mozilla/pdf.js/commit/85e64b5c16c9aaef738f421733c12911a441cec6",
"https://bugzilla.mozilla.org/show_bug.cgi?id=1893645",
"https://github.com/mozilla/pdf.js"
]
}
],
"extractors": {
"uri": ["/pdf\\.js/(§§version§§)/", "/pdfjs-dist@(§§version§§)/"],
"filecontent": [
" pdfjs-dist@(§§version§§) ",
"(?:const|var) pdfjsVersion = ['\"](§§version§§)['\"];",
"PDFJS.version ?= ?['\"](§§version§§)['\"]",
"apiVersion: ?['\"](§§version§§)['\"][\\s\\S]*,data(:[a-zA-Z.]{1,6})?,[\\s\\S]*password(:[a-zA-Z.]{1,10})?,[\\s\\S]*disableAutoFetch(:[a-zA-Z.]{1,22})?,[\\s\\S]*rangeChunkSize",
"messageHandler\\.sendWithPromise\\(\"GetDocRequest\",\\{docId:[a-zA-Z],apiVersion:\"(§§version§§)\""
]
}
},
"dont check": {
"vulnerabilities": [],
"extractors": {
Expand Down
45 changes: 45 additions & 0 deletions repository/jsrepository-v2.json
Original file line number Diff line number Diff line change
Expand Up @@ -7455,6 +7455,51 @@
]
}
},
"pdf.js": {
"bowername": [
"pdfjs-dist"
],
"npmname": "pdfjs-dist",
"vulnerabilities": [
{
"atOrAbove": "0",
"below": "4.2.67",
"cwe": [
"CWE-79"
],
"severity": "high",
"identifiers": {
"summary": "PDF.js vulnerable to arbitrary JavaScript execution upon opening a malicious PDF",
"CVE": [
"CVE-2024-34342",
"CVE-2024-4367"
],
"githubID": "GHSA-wgrm-67xf-hhpq"
},
"info": [
"https://github.com/advisories/GHSA-wgrm-67xf-hhpq",
"https://github.com/mozilla/pdf.js/security/advisories/GHSA-wgrm-67xf-hhpq",
"https://github.com/mozilla/pdf.js/pull/18015",
"https://github.com/mozilla/pdf.js/commit/85e64b5c16c9aaef738f421733c12911a441cec6",
"https://bugzilla.mozilla.org/show_bug.cgi?id=1893645",
"https://github.com/mozilla/pdf.js"
]
}
],
"extractors": {
"uri": [
"/pdf\\.js/(§§version§§)/",
"/pdfjs-dist@(§§version§§)/"
],
"filecontent": [
" pdfjs-dist@(§§version§§) ",
"(?:const|var) pdfjsVersion = ['\"](§§version§§)['\"];",
"PDFJS.version ?= ?['\"](§§version§§)['\"]",
"apiVersion: ?['\"](§§version§§)['\"][\\s\\S]*,data(:[a-zA-Z.]{1,6})?,[\\s\\S]*password(:[a-zA-Z.]{1,10})?,[\\s\\S]*disableAutoFetch(:[a-zA-Z.]{1,22})?,[\\s\\S]*rangeChunkSize",
"messageHandler\\.sendWithPromise\\(\"GetDocRequest\",\\{docId:[a-zA-Z],apiVersion:\"(§§version§§)\""
]
}
},
"dont check": {
"vulnerabilities": [],
"extractors": {
Expand Down
45 changes: 45 additions & 0 deletions repository/jsrepository.json
Original file line number Diff line number Diff line change
Expand Up @@ -7385,6 +7385,51 @@
]
}
},
"pdf.js": {
"bowername": [
"pdfjs-dist"
],
"npmname": "pdfjs-dist",
"vulnerabilities": [
{
"atOrAbove": "0",
"below": "4.2.67",
"cwe": [
"CWE-79"
],
"severity": "high",
"identifiers": {
"summary": "PDF.js vulnerable to arbitrary JavaScript execution upon opening a malicious PDF",
"CVE": [
"CVE-2024-34342",
"CVE-2024-4367"
],
"githubID": "GHSA-wgrm-67xf-hhpq"
},
"info": [
"https://github.com/advisories/GHSA-wgrm-67xf-hhpq",
"https://github.com/mozilla/pdf.js/security/advisories/GHSA-wgrm-67xf-hhpq",
"https://github.com/mozilla/pdf.js/pull/18015",
"https://github.com/mozilla/pdf.js/commit/85e64b5c16c9aaef738f421733c12911a441cec6",
"https://bugzilla.mozilla.org/show_bug.cgi?id=1893645",
"https://github.com/mozilla/pdf.js"
]
}
],
"extractors": {
"uri": [
"/pdf\\.js/(§§version§§)/",
"/pdfjs-dist@(§§version§§)/"
],
"filecontent": [
" pdfjs-dist@(§§version§§) ",
"(?:const|var) pdfjsVersion = ['\"](§§version§§)['\"];",
"PDFJS.version ?= ?['\"](§§version§§)['\"]",
"apiVersion: ?['\"](§§version§§)['\"][\\s\\S]*,data(:[a-zA-Z.]{1,6})?,[\\s\\S]*password(:[a-zA-Z.]{1,10})?,[\\s\\S]*disableAutoFetch(:[a-zA-Z.]{1,22})?,[\\s\\S]*rangeChunkSize",
"messageHandler\\.sendWithPromise\\(\"GetDocRequest\",\\{docId:[a-zA-Z],apiVersion:\"(§§version§§)\""
]
}
},
"dont check": {
"vulnerabilities": [],
"extractors": {
Expand Down
18 changes: 18 additions & 0 deletions repository/testcases.json
Original file line number Diff line number Diff line change
Expand Up @@ -634,5 +634,23 @@
"allowAstMiss": ["0.17.1"],
"subversions": ["", ".min"]
}
},
"pdf.js": {
"https://cdnjs.cloudflare.com/ajax/libs/pdf.js/§§version§§/pdf§§subversion§§.mjs": {
"versions": ["4.3.136", "4.0.189"],
"subversions": ["", ".min"]
},
"https://cdnjs.cloudflare.com/ajax/libs/pdf.js/§§version§§/pdf§§subversion§§.js": {
"versions": [
"3.11.174",
"3.2.146",
"2.16.105",
"2.2.2",
"2.0.173",
"1.10.100",
"1.0.818"
],
"subversions": ["", ".min"]
}
}
}
Loading