{"answers":{"affected":"3 open source packages ship an affected version, including gogs.io/gogs.","exploited":"There is no known exploitation of GHSA-pj96-4jhv-v792 in the wild and no public exploit code.","fix":"Upgrade gogs.io/gogs to 0.12.8 or later.","what":"GHSA-pj96-4jhv-v792 is a cross-site scripting vulnerability in gogs.io/gogs, published on 2 Jun 2022. Any signed-in user can exploit it over the network, and only if a user opens a file or follows a link."},"fix_prompt":"Check this codebase for GHSA-pj96-4jhv-v792 and fix it if it is affected.\n\nWhat it is: GHSA-pj96-4jhv-v792 is a cross-site scripting vulnerability in gogs.io/gogs, published on 2 Jun 2022. Any signed-in user can exploit it over the network, and only if a user opens a file or follows a link.\nExploitation: There is no known exploitation of GHSA-pj96-4jhv-v792 in the wild and no public exploit code.\n\nAffected packages and fixed versions:\n- gogs.io/gogs (Go): affected all versions; fixed in 0.12.8\n- gogs.io/gogs (Go): affected all versions; fixed in 0.12.8\n- gogs.io/gogs (Go): affected all versions; fixed in 0.12.8\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/GHSA-pj96-4jhv-v792/ (Markdown: https://insights.sbomify.com/GHSA-pj96-4jhv-v792/index.md)","id":"GHSA-pj96-4jhv-v792","markdown":"https://insights.sbomify.com/GHSA-pj96-4jhv-v792/index.md","name":"GHSA-pj96-4jhv-v792","record":{"aliases":["GO-2022-0473"],"analysis":{"component_type":"web_application","fix_type":"upgrade","impacts":["security_bypass"],"network_reachable":"yes","non_default_config":false,"product_category":"Gogs Git server","requires_auth":"low_privilege","summary":"An attacker can manipulate CSRF cookies to trigger self-XSS in Gogs, potentially bypassing security controls for the malicious user.","user_interaction":"required","vuln_class":"xss"},"analysis_generated_by":"qwen3.8-flash-next","assigner":null,"cpe":[],"cvss":{"score":null,"severity":null,"source":null,"vector":null,"version":null},"cwes":[],"description":"### Impact\n\nThere is no known practical impact other than it is just possible to manipulate CSRF cookie and XSS the malicious user self.\n\n### Patches\n\nInvalid characters of CSRF tokens are stripped after reading cookie. Users should upgrade to 0.12.8 or the latest 0.13.0+dev.\n\n### Workarounds\n\nNo need for workarounds.\n\n### References\n\nN/A\n\n### For more information\n\nIf you have any questions or comments about this advisory, please post on https://github.com/gogs/gogs/issues/6953.","ecosystems":["Go"],"exploits":{"exploitdb":null,"first_seen":null,"github_poc":null,"max_poc_stars":null,"metasploit":null,"nuclei":null,"refs":[],"tier":null},"has_fix":true,"headline":"Cross site scripting via cookies in gogs","id":"GHSA-pj96-4jhv-v792","indexable":true,"kev":null,"kind":"advisory","links":{"ecosystem":"Go","product":null,"products":[],"type":"xss","year":"2022"},"n_packages":3,"n_references":null,"packages":[{"ecosystem":"Go","fixed":["0.12.8"],"introduced":["0"],"last_affected":[],"package":"gogs.io/gogs","purl":null,"source":"GHSA-pj96-4jhv-v792"},{"ecosystem":"Go","fixed":["0.12.8"],"introduced":["0"],"last_affected":[],"package":"gogs.io/gogs","purl":"pkg:golang/gogs.io/gogs","source":"GHSA-pj96-4jhv-v792"},{"ecosystem":"Go","fixed":["0.12.8"],"introduced":["0"],"last_affected":[],"package":"gogs.io/gogs","purl":"pkg:golang/gogs.io/gogs","source":"GO-2022-0473"}],"products":null,"published":"2022-06-02","related":[],"sources":[{"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"}],"ssvc":{"automatable":null,"exploitation":null,"technical_impact":null},"state":null,"updated":null,"vendors":null},"summary":"An attacker can manipulate CSRF cookies to trigger self-XSS in Gogs, potentially bypassing security controls for the malicious user.","url":"https://insights.sbomify.com/GHSA-pj96-4jhv-v792/"}