{"answers":{"affected":"3 open source packages ship an affected version, including github.com/grafana/agent. It affects 1 product.","exploited":"There is no known exploitation of CVE-2021-41090 in the wild and no public exploit code.","fix":"Upgrade github.com/grafana/agent to 0.21.2 or later.","what":"CVE-2021-41090 is a medium-severity vulnerability in grafana agent, published on 8 Dec 2021. An attacker can exploit it over the internet without logging in, with no action from the victim."},"fix_prompt":"Check this codebase for CVE-2021-41090 and fix it if it is affected.\n\nWhat it is: CVE-2021-41090 is a medium-severity vulnerability in grafana agent, published on 8 Dec 2021. An attacker can exploit it over the internet without logging in, with no action from the victim.\nExploitation: There is no known exploitation of CVE-2021-41090 in the wild and no public exploit code.\n\nAffected packages and fixed versions:\n- github.com/grafana/agent (Go): affected from 0.14.0; fixed in 0.21.2\n- github.com/grafana/agent (Go): affected from 0.14.0; fixed in 0.21.2\n- github.com/grafana/agent (Go): affected from 0.14.0; fixed in 0.21.2\n\nTask:\n1. Search the dependency manifests and lockfiles (for example package.json, package-lock.json, requirements.txt, poetry.lock, uv.lock, pom.xml, build.gradle, go.mod, Cargo.lock, Gemfile.lock) and any Dockerfiles for the affected packages, including transitive dependencies.\n2. If an affected version is in use, upgrade it to the fixed version for its release line with the project's package manager, so the lockfile is regenerated. Prefer the smallest upgrade that fixes it.\n3. If there is no fix, or the upgrade would break the build, do not guess: explain the risk and the safest workaround instead.\n4. Run the tests and summarise what changed and why.\n5. If nothing in the project is affected, say so and change nothing.\n\nReference: https://insights.sbomify.com/CVE-2021-41090/ (Markdown: https://insights.sbomify.com/CVE-2021-41090/index.md)","id":"CVE-2021-41090","markdown":"https://insights.sbomify.com/CVE-2021-41090/index.md","name":"CVE-2021-41090","record":{"aliases":["GHSA-9c4x-5hgq-q3wh","GO-2022-0305"],"analysis":{"component_type":"server_software","fix_type":"upgrade","impacts":["data_read"],"network_reachable":"yes","non_default_config":false,"product_category":"Grafana Agent","requires_auth":"none","summary":"Unauthenticated attackers can read plaintext inline secrets from Grafana Agent configuration endpoints, potentially compromising telemetry credentials.","user_interaction":"not_required","vuln_class":"information_disclosure"},"analysis_generated_by":"qwen3.8-flash-next","assigner":"GitHub_M","cpe":[{"product":"agent","vendor":"grafana"}],"cvss":{"score":6.5,"severity":"medium","source":"cna","vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:L/I:L/A:N","version":"3.1"},"cwes":[{"id":"CWE-312","name":"Cleartext Storage of Sensitive Information"},{"id":"CWE-200","name":"Exposure of Sensitive Information to an Unauthorized Actor"}],"description":"Grafana Agent is a telemetry collector for sending metrics, logs, and trace data to the opinionated Grafana observability stack. Prior to versions 0.20.1 and 0.21.2, inline secrets defined within a metrics instance config are exposed in plaintext over two endpoints: metrics instance configs defined in the base YAML file are exposed at `/-/config` and metrics instance configs defined for the scraping service are exposed at `/agent/api/v1/configs/:key`. Inline secrets will be exposed to anyone being able to reach these endpoints. If HTTPS with client authentication is not configured, these endpoints are accessible to unauthenticated users. Secrets found in these sections are used for delivering metrics to a Prometheus Remote Write system, authenticating against a system for discovering Prometheus targets, and authenticating against a system for collecting metrics. This does not apply for non-inlined secrets, such as `*_file` based secrets. This issue is patched in Grafana Agent versions 0.20.1 and 0.21.2. A few workarounds are available. Users who cannot upgrade should use non-inline secrets where possible. Users may also desire to restrict API access to Grafana Agent with some combination of restricting the network interfaces Grafana Agent listens on through `http_listen_address` in the `server` block, configuring Grafana Agent to use HTTPS with client authentication, and/or using firewall rules to restrict external access to Grafana Agent's API.","ecosystems":["Go"],"exploits":{"exploitdb":0,"first_seen":null,"github_poc":0,"max_poc_stars":null,"metasploit":0,"nuclei":0,"refs":[],"tier":"none_known"},"has_fix":true,"headline":"Instance config inline secret exposure","id":"CVE-2021-41090","indexable":true,"kev":null,"kind":"cve","links":{"ecosystem":"Go","product":null,"products":[],"type":"information_disclosure","year":"2021"},"n_packages":3,"n_references":6,"next":{"headline":"Insufficiently restricted permissions on data directory in Docker Engine","id":"CVE-2021-41091"},"packages":[{"ecosystem":"Go","fixed":["0.21.2"],"introduced":["0.14.0"],"last_affected":[],"package":"github.com/grafana/agent","purl":null,"source":"GHSA-9c4x-5hgq-q3wh"},{"ecosystem":"Go","fixed":["0.21.2"],"introduced":["0.14.0"],"last_affected":[],"package":"github.com/grafana/agent","purl":"pkg:golang/github.com/grafana/agent","source":"GHSA-9c4x-5hgq-q3wh"},{"ecosystem":"Go","fixed":["0.21.2"],"introduced":["0.14.0"],"last_affected":[],"package":"github.com/grafana/agent","purl":"pkg:golang/github.com/grafana/agent","source":"GO-2022-0305"}],"prev":{"headline":"`docker cp` allows unexpected chmod of host files","id":"CVE-2021-41089"},"products":["agent"],"published":"2021-12-08","related":[{"cvss_score":7.3,"headline":"Grafana Agent Flow on Windows Unquoted service path","id":"CVE-2024-8996","kev_date_added":null,"published":"2024-09-25"}],"sources":[{"class":"attribution","licence":"CVE Terms of Use (MITRE)","name":"CVE List","prefix":"CVE"},{"class":"attribution","licence":"CC BY 4.0","name":"GitHub Advisory Database","prefix":"GHSA"},{"class":"attribution","licence":"CC BY 4.0","name":"Go Vulnerability Database","prefix":"GO"},{"class":"attribution","licence":"US public information, NVD API terms","name":"NVD"},{"class":"attribution","licence":"CWE Terms of Use","name":"CWE (MITRE)"},{"class":"attribution","licence":"FIRST CVSS licence","name":"CVSS (FIRST)"}],"ssvc":{"automatable":null,"exploitation":null,"technical_impact":null},"state":"PUBLISHED","updated":"2024-08-04","vendors":["grafana"]},"summary":"Unauthenticated attackers can read plaintext inline secrets from Grafana Agent configuration endpoints, potentially compromising telemetry credentials.","url":"https://insights.sbomify.com/CVE-2021-41090/"}