{"answers":{"affected":"8 open source packages ship an affected version, including github.com/goharbor/harbor, harbor and github.com/goharbor/harbor/src. It affects 1 product.","exploited":"There is no known exploitation of CVE-2022-31668 in the wild and no public exploit code.","fix":"Upgrade github.com/goharbor/harbor to a fixed version for your release line: 2.4.3, 2.4.3+incompatible, 2.5.2+incompatible or 2.5.2.","what":"CVE-2022-31668 is a high-severity missing authorization vulnerability in Harbor, published on 14 Nov 2024. Any signed-in user can exploit it over the network, with no action from the victim."},"fix_prompt":"Check this codebase for CVE-2022-31668 and fix it if it is affected.\n\nWhat it is: CVE-2022-31668 is a high-severity missing authorization vulnerability in Harbor, published on 14 Nov 2024. Any signed-in user can exploit it over the network, with no action from the victim.\nExploitation: There is no known exploitation of CVE-2022-31668 in the wild and no public exploit code.\n\nAffected packages and fixed versions:\n- github.com/goharbor/harbor (Go): affected from 2.0.0; fixed in 2.4.3\n- github.com/goharbor/harbor (Go): affected from 2.0.0; fixed in 2.4.3\n- github.com/goharbor/harbor (Go): affected from 2.0.0+incompatible; fixed in 2.4.3+incompatible, 2.5.2+incompatible\n- github.com/goharbor/harbor (Go): affected from 2.5.0; fixed in 2.5.2\n- github.com/goharbor/harbor (Go): affected from 2.5.0; fixed in 2.5.2\n- harbor (Bitnami): affected from 2.0.0; fixed in 2.4.3, 2.5.2\n- github.com/goharbor/harbor/src (Go): affected all versions; fixed in 0.0.0-20220630175814-b4ef1db\n- github.com/goharbor/harbor/src (Go): affected all versions; fixed in 0.0.0-20220630175814-b4ef1db\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-2022-31668/ (Markdown: https://insights.sbomify.com/CVE-2022-31668/index.md)","id":"CVE-2022-31668","markdown":"https://insights.sbomify.com/CVE-2022-31668/index.md","name":"CVE-2022-31668","record":{"aliases":["BIT-harbor-2022-31668","GHSA-3wpx-625q-22j7","GHSA-r864-28pw-8682","GO-2024-3268"],"analysis":{"component_type":"container_or_infrastructure","fix_type":"upgrade","impacts":["data_modify","data_read"],"network_reachable":"yes","non_default_config":false,"product_category":"Harbor container registry","requires_auth":"low_privilege","summary":"Attackers can modify P2P preheat policies in unauthorized projects and access execution logs due to missing permission checks.","user_interaction":"not_required","vuln_class":"missing_authorization"},"analysis_generated_by":"qwen3.8-flash-next","assigner":"vmware","cpe":[{"product":"harbor","vendor":"linuxfoundation"}],"cvss":{"score":7.4,"severity":"high","source":"cna","vector":"CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:C/C:L/I:L/A:L","version":"3.1"},"cwes":[{"id":"CWE-863","name":"Incorrect Authorization"},{"id":"CWE-285","name":"Improper Authorization"}],"description":"Harbor fails to validate the user permissions when updating p2p preheat policies. By sending a request to update a p2p preheat policy with an id that belongs to a project that the currently authenticated user doesn't have access to, the attacker could modify p2p preheat policies configured in other projects.","ecosystems":["Bitnami","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":"User permission validation failure and disclosure of P2P preheat execution logs","id":"CVE-2022-31668","indexable":true,"kev":null,"kind":"cve","links":{"ecosystem":"Bitnami","product":null,"products":[],"type":"missing_authorization","year":"2022"},"n_packages":8,"n_references":1,"next":{"headline":"Harbor fails to validate the user permissions when updating tag immutability policies","id":"CVE-2022-31669"},"packages":[{"ecosystem":"Bitnami","fixed":["2.4.3","2.5.2"],"introduced":["2.0.0","2.5.0"],"last_affected":[],"package":"harbor","purl":"pkg:bitnami/harbor","source":"BIT-harbor-2022-31668"},{"ecosystem":"Go","fixed":["2.4.3"],"introduced":["2.0.0"],"last_affected":[],"package":"github.com/goharbor/harbor","purl":null,"source":"GHSA-r864-28pw-8682"},{"ecosystem":"Go","fixed":["2.4.3"],"introduced":["2.0.0"],"last_affected":[],"package":"github.com/goharbor/harbor","purl":"pkg:golang/github.com/goharbor/harbor","source":"GHSA-r864-28pw-8682"},{"ecosystem":"Go","fixed":["2.4.3+incompatible","2.5.2+incompatible"],"introduced":["2.0.0+incompatible","2.5.0+incompatible"],"last_affected":[],"package":"github.com/goharbor/harbor","purl":"pkg:golang/github.com/goharbor/harbor","source":"GO-2024-3268"},{"ecosystem":"Go","fixed":["2.5.2"],"introduced":["2.5.0"],"last_affected":[],"package":"github.com/goharbor/harbor","purl":null,"source":"GHSA-r864-28pw-8682"},{"ecosystem":"Go","fixed":["2.5.2"],"introduced":["2.5.0"],"last_affected":[],"package":"github.com/goharbor/harbor","purl":"pkg:golang/github.com/goharbor/harbor","source":"GHSA-r864-28pw-8682"},{"ecosystem":"Go","fixed":["0.0.0-20220630175814-b4ef1db"],"introduced":["0"],"last_affected":[],"package":"github.com/goharbor/harbor/src","purl":null,"source":"GHSA-r864-28pw-8682"},{"ecosystem":"Go","fixed":["0.0.0-20220630175814-b4ef1db"],"introduced":["0"],"last_affected":[],"package":"github.com/goharbor/harbor/src","purl":"pkg:golang/github.com/goharbor/harbor/src","source":"GHSA-r864-28pw-8682"}],"prev":{"headline":"Harbor fails to validate the user permissions when updating a robot account","id":"CVE-2022-31667"},"products":["Harbor"],"published":"2024-11-14","related":[{"cvss_score":9.4,"headline":"Use of hard coded credentials in GoHarbor Harbor","id":"CVE-2026-4404","kev_date_added":null,"published":"2026-03-23"},{"cvss_score":8.8,"headline":"Privilege Escalation in Cloud Native Computing Foundation Harbor","id":"CVE-2019-19023","kev_date_added":null,"published":"2020-03-20"},{"cvss_score":8.8,"headline":"Cross-site Request Forgery (CSRF) in Cloud Native Computing Foundation Harbor","id":"CVE-2019-19025","kev_date_added":null,"published":"2020-03-20"},{"cvss_score":8.6,"headline":"Server-side request forgery in n/a","id":"CVE-2017-17697","kev_date_added":null,"published":"2017-12-15"},{"cvss_score":7.7,"headline":"Harbor fails to validate user permissions while Viewing, updating and deleting Webhook policies","id":"CVE-2022-31666","kev_date_added":null,"published":"2024-11-14"},{"cvss_score":7.7,"headline":"Harbor fails to validate the user permissions when updating tag retention policies","id":"CVE-2022-31670","kev_date_added":null,"published":"2024-11-14"},{"cvss_score":7.5,"headline":"Missing authorization in n/a","id":"CVE-2022-46463","kev_date_added":null,"published":"2023-01-12"}],"sources":[{"class":"attribution","licence":"Apache-2.0","name":"Bitnami","prefix":"BIT"},{"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":"no","exploitation":"none","technical_impact":"partial"},"state":"PUBLISHED","updated":"2024-11-14","vendors":["n/a"]},"summary":"Attackers can modify P2P preheat policies in unauthorized projects and access execution logs due to missing permission checks.","url":"https://insights.sbomify.com/CVE-2022-31668/"}