Reads a public plugin file after a version hit. Advisory
Detect
Fingerprints Grafana and flags CVE-2021-43798 by version.
Report
Counts checked, product, affected, and confirmed.
Targets
Hosts, IPs, or URLs, one per line. Empty input uses localhost.
Overview
This workflow finds Grafana and sorts each host by whether its version falls in the CVE-2021-43798 range. Grafana sits on dashboards, datasources, and sometimes secrets. CVE-2021-43798 is the plugin-asset path traversal that let unauthenticated readers pull files off disk. CISA put it on KEV because the exploit was public and used. A forgotten 8.x box on a lab VLAN still answers the same login you already know. Give it hostnames, IP addresses, or URLs you are authorised to test. The workflow fingerprints the product from the public page (title match on Grafana), reads the version from /api/health with a fallback to the root body, and compares that number to the range table in the graph. Every host comes back affected or not, so a fleet advisory becomes an evidenced list for exposure management. CVE-2021-43798 is on CISA KEV (known exploited). Version flag is first. Hosts in range get a second node that only reads a public plugin asset through the known traversal. It does not read secrets or write files.
Run it on a schedule when the estate changes. New hosts and delayed patch windows are the reason the same check is worth more the second week than the first.
Pipeline
Read the target list. Hosts, URLs, or ranges, one per line, become the scope.
Fingerprint each host as Grafana from the public page title, then GET /api/health and parse the version. A host counts as affected only when the fingerprint matches and the version is inside the encoded range.
Confirm only those flagged hosts by reading a public plugin asset through the known traversal.
Collect the per-host rows: product match, version, affected flag, confirmed flag, and any fetch error.
Emit the summary counts: hosts checked, product hits, affected, confirmed, and errors.
Inputs
Target list. Hostnames, IP addresses, CIDR ranges, or URLs, one per line. JSONL with a url field also works. Point it at scope you are authorised to test. Fingerprint is read-only GET. Confirm is a GET of a public plugin file, and only after the version flag.
Outputs
results.jsonl. One row per host: URL, whether Grafana was detected, the version read, the affected flag, and whether the public-file confirm succeeded.
summary.json. Counts across the list: targets, product hits, affected, and errors.
Integrations
HTTP. Unauthenticated GET to the product root, /api/health, and (on flagged hosts only) a public plugin asset.
Sample output
The records below are illustrative and do not come from a real run. They show one Grafana host inside the CVE-2021-43798 range, one patched host, and one host that is not the product.
8.0.1 through 8.0.6, 8.1.0 through 8.1.7, 8.2.0 through 8.2.6, and exactly 8.3.0. 8.3.1 and later on the 8.3 line is the floor the graph treats as not affected. The compare uses the version the product itself served.
Does a flagged host mean CVE-2021-43798 was exploited?
No. A flagged row is patch-lag against the range table. Confirm only tries to read a public plugin file. Treat a confirmed row as evidence the traversal still answers, not as proof someone already used it.
Is this check safe on production?
Yes. Fingerprint is read-only GET. Confirm is another GET of a public plugin asset, only on hosts already in range. It does not log in, dump secrets, or write files.
Does the check need credentials?
No. It fingerprints the public page and reads /api/health the way an external scanner would.
What is CVE-2021-43798?
Unauthenticated path traversal in Grafana plugin assets. CISA listed it on KEV after public exploit and confirmed use. This workflow flags by version, then confirms with a public-file read.