Lookup for vulnerable packages by Package URL.

Purlpkg:npm/%40saltcorn/cli@0.5.0-beta.0
Typenpm
Namespace@saltcorn
Namecli
Version0.5.0-beta.0
Qualifiers
Subpath
Is_vulnerabletrue
Next_non_vulnerable_version0.8.8-beta.2
Latest_non_vulnerable_version0.8.8-beta.2
Affected_by_vulnerabilities
0
url VCID-n1wx-uj68-g7bd
vulnerability_id VCID-n1wx-uj68-g7bd
summary
Unsafe plugins can be installed via pack import by tenant admins
### Summary
Unsafe plugins (for instance `sql-list`) can be installed in subdomain tenants via pack import even if unsafe plugin installation for tenants is disables

### Details
I have an example
https://bot20230704.saltcorn.com/view/all_plugins
It's publicly accessible (but has not so secure values except list of tenants).
But using this mech one can read **any** data from other tenants.

### Impact
All tenants of installation (i.e. `saltcorn.com`), can be compromised from tenant user has admin access. If an untrusted user has admin rights to a tenant instance, they will be able to install a plug-in that can access information from other tenants

### Revived after 0.8.7
After patch in 0.8.7 this is not fixed completely.

Here are steps to reproduce:
1. Publish to NPM plugin that was not approved by admin (in case of saltcorn.com) by @glutamate. I've just published this one: https://www.npmjs.com/package/saltcorn-qrcode
2. Publish somewhere plugin store that includes plugin from previous step: https://gist.github.com/pyhedgehog/f1fd7cb13f4d0a7ccf6a965748d19bd2
3. Add plugin store link to tenant store.
4. Install plugin.
5. Use it in tenant: https://bot20230704.saltcorn.com/view/testqr_show/1

Here are logic:
Unsafe plugins checked against this list:
https://github.com/saltcorn/saltcorn/blob/99fe277e497fd193bb070acd8c663aa254a9907c/packages/server/load_plugins.js#L191
But it's under control of tenant admin, not server admin.
Proposed login:
```javascript
const safes = getRootState().getConfig("available_plugins",[]).filter(p=>!p.unsafe).map(p=>p.location);
```
references
0
reference_url https://github.com/saltcorn/saltcorn
reference_id
reference_type
scores
0
value 8.7
scoring_system cvssv3.1
scoring_elements CVSS:3.1/AV:N/AC:L/PR:H/UI:N/S:C/C:H/I:N/A:H
1
value HIGH
scoring_system generic_textual
scoring_elements
url https://github.com/saltcorn/saltcorn
1
reference_url https://github.com/saltcorn/saltcorn/blob/99fe277e497fd193bb070acd8c663aa254a9907c/packages/server/load_plugins.js#L191
reference_id
reference_type
scores
0
value 8.7
scoring_system cvssv3.1
scoring_elements CVSS:3.1/AV:N/AC:L/PR:H/UI:N/S:C/C:H/I:N/A:H
1
value HIGH
scoring_system generic_textual
scoring_elements
url https://github.com/saltcorn/saltcorn/blob/99fe277e497fd193bb070acd8c663aa254a9907c/packages/server/load_plugins.js#L191
2
reference_url https://github.com/saltcorn/saltcorn/commit/0f32a51277a635c814a634bda9b6d358fb8c04ab
reference_id
reference_type
scores
0
value 8.7
scoring_system cvssv3.1
scoring_elements CVSS:3.1/AV:N/AC:L/PR:H/UI:N/S:C/C:H/I:N/A:H
1
value HIGH
scoring_system generic_textual
scoring_elements
url https://github.com/saltcorn/saltcorn/commit/0f32a51277a635c814a634bda9b6d358fb8c04ab
3
reference_url https://github.com/saltcorn/saltcorn/pull/1973
reference_id
reference_type
scores
0
value 8.7
scoring_system cvssv3.1
scoring_elements CVSS:3.1/AV:N/AC:L/PR:H/UI:N/S:C/C:H/I:N/A:H
1
value HIGH
scoring_system generic_textual
scoring_elements
url https://github.com/saltcorn/saltcorn/pull/1973
4
reference_url https://github.com/saltcorn/saltcorn/security/advisories/GHSA-wxf3-4fvj-vqqx
reference_id
reference_type
scores
0
value 8.7
scoring_system cvssv3.1
scoring_elements CVSS:3.1/AV:N/AC:L/PR:H/UI:N/S:C/C:H/I:N/A:H
1
value HIGH
scoring_system cvssv3.1_qr
scoring_elements
2
value HIGH
scoring_system generic_textual
scoring_elements
url https://github.com/saltcorn/saltcorn/security/advisories/GHSA-wxf3-4fvj-vqqx
5
reference_url https://github.com/advisories/GHSA-wxf3-4fvj-vqqx
reference_id GHSA-wxf3-4fvj-vqqx
reference_type
scores
0
value HIGH
scoring_system cvssv3.1_qr
scoring_elements
url https://github.com/advisories/GHSA-wxf3-4fvj-vqqx
fixed_packages
0
url pkg:npm/%40saltcorn/cli@0.8.8-beta.2
purl pkg:npm/%40saltcorn/cli@0.8.8-beta.2
is_vulnerable false
affected_by_vulnerabilities
resource_url http://public2.vulnerablecode.io/packages/pkg:npm/%2540saltcorn/cli@0.8.8-beta.2
aliases GHSA-wxf3-4fvj-vqqx, GMS-2023-1876
risk_score 4.0
exploitability 0.5
weighted_severity 8.0
resource_url http://public2.vulnerablecode.io/vulnerabilities/VCID-n1wx-uj68-g7bd
Fixing_vulnerabilities
Risk_score4.0
Resource_urlhttp://public2.vulnerablecode.io/packages/pkg:npm/%2540saltcorn/cli@0.5.0-beta.0