GHSA-pj96-4jhv-v792: Gogs.io/gogs Cross Site Scripting Vulnerability
LOWGHSA-pj96-4jhv-v792 is a LOW cross site scripting vulnerability (CWE-79: Improper Neutralization of Input During Web Page Generation ('Cross-site Scripting')) affecting Gogs.io/gogs libraries in the Go ecosystem. The issue involves cross site scripting via cookies in gogs. Remediation is available by upgrading affected packages to version 0.12.8.
GHSA-pj96-4jhv-v792 at a Glance
How to Fix GHSA-pj96-4jhv-v792
To remediate this vulnerability, upgrade all affected Gogs.io/gogs dependencies to a patched release. Both direct and transitive dependencies should be checked, as frameworks or security libraries may pull in vulnerable versions transitively.
Upgrade gogs.io/gogs to 0.12.8
Run the following command in your project directory to verify that all resolved dependencies use the patched release:
inspect dependencies for gogs.io/gogs
How to Check if You Are Affected
To determine whether your application is affected by GHSA-pj96-4jhv-v792, inspect your project dependencies for Gogs.io/gogs:
inspect dependencies for gogs.io/gogs
Analyze the terminal output to locate any version of Gogs.io/gogs in your dependency tree. If any resolved version matches the vulnerable ranges listed in the table below (for example, versions earlier than 0.12.8), your application is affected.
Note: Verify declared build manifests and deployed runtime container environments.
Technical Details
Vulnerability Mechanism & Technical Analysis
This vulnerability is classified under CWE-79: Improper Neutralization of Input During Web Page Generation ('Cross-site Scripting'), where the product does not neutralize or incorrectly neutralizes user-controllable input before it is placed in output that is used as a web page that is served to other users. In Gogs.io/gogs, software state validation or input boundaries are circumvented during processing. Review the official source advisory statement below for specific affected components, classes, and reproduction details.
Source Advisory Statement
GHSA-pj96-4jhv-v792 Affected Gogs.io/gogs Versions
1 component(s)| Product / Package | Ecosystem | Affected Versions | Fixed Version |
|---|---|---|---|
|
gogs.io/gogs
|
Go |
< 0.12.8
|
0.12.8
|
References
Frequently Asked Questions
What is GHSA-pj96-4jhv-v792?
Which Gogs.io/gogs versions are affected?
What version fixes GHSA-pj96-4jhv-v792?
Is gogs.io/gogs affected?
What CWE is associated with GHSA-pj96-4jhv-v792?
How can I check Go dependencies for GHSA-pj96-4jhv-v792?
Machine-readable OSV JSON
OSV v1.5 Schema
{
"schema_version" : "1.4.0",
"id" : "GHSA-pj96-4jhv-v792",
"modified" : "2022-06-02T20:46:30Z",
"published" : "2022-06-02T20:46:30Z",
"aliases" : [ ],
"summary" : "Cross site scripting via cookies in gogs",
"details" : "### 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.\n",
"severity" : [ ],
"affected" : [ {
"package" : {
"ecosystem" : "Go",
"name" : "gogs.io/gogs"
},
"ranges" : [ {
"type" : "ECOSYSTEM",
"events" : [ {
"introduced" : "0"
}, {
"fixed" : "0.12.8"
} ]
} ]
} ],
"references" : [ {
"type" : "WEB",
"url" : "https://github.com/gogs/gogs/security/advisories/GHSA-pj96-4jhv-v792"
}, {
"type" : "WEB",
"url" : "https://github.com/gogs/gogs/issues/6953"
}, {
"type" : "PACKAGE",
"url" : "https://github.com/gogs/gogs"
} ],
"database_specific" : {
"cwe_ids" : [ "CWE-79" ],
"severity" : "LOW",
"github_reviewed" : true,
"github_reviewed_at" : "2022-06-02T20:46:30Z",
"nvd_published_at" : null
}
}