Vulnerabilities in pkg:golang/github.com/gogits/gogs

PACKAGE
Advisory Identifier: GHSA-mr6h-chqp-p9g2
Advisory Summary

CVE-2014-8681 is a MODERATE (CVSS 6.5) sql injection vulnerability (CWE-89: Improper Neutralization of Special Elements used in an SQL Command ('SQL Injection')) affecting Gogs.io/gogs libraries in the Go ecosystem. The issue involves sql injection in gogs.io/gogs. Remediation is available by upgrading affected packages to version 0.5.8.

1 Known Advisory Record(s)
Package Vulnerability Intelligence

pkg:golang/github.com/gogits/gogs

1 Known Advisory Record(s)

Vulnerability advisories affecting package pkg:golang/github.com/gogits/gogs. Select an advisory below to view technical details or fixes.

Advisory ID CVE / NVD Severity Summary
GHSA-mr6h-chqp-p9g2 CVE-2014-8681 MODERATE SQL Injection in gogs.io/gogs

CVE-2014-8681 at a Glance

CVE Identifier CVE-2014-8681
GHSA Identifier GHSA-mr6h-chqp-p9g2
Severity MODERATE
CVSS v3.1 Base Score 6.5
CWE Classification CWE-89: Improper Neutralization of Special Elements used in an SQL Command ('SQL Injection')
Affected Product Gogs.io/gogs
Package Ecosystem Go
Published Date
Last Updated

Security Impact

CVSS: 6.5

The security impact metrics below are parsed directly from the CVSS v3.1 vector string (CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:C/C:L/I:L/A:L).

Attack Vector Network (AV:N)
Attack Complexity High (AC:H)
Privileges Required None (PR:N)
User Interaction None (UI:N)
Scope Changed (S:C)
Confidentiality Low (C:L)
Integrity Low (I:L)
Availability Low (A:L)

How to Fix CVE-2014-8681

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.

gogs.io/gogs fixed: 0.5.8
Upgrade gogs.io/gogs to 0.5.8
github.com/gogits/gogs fixed: 0.5.8
Upgrade github.com/gogits/gogs to 0.5.8
Verify Direct and Transitive Dependencies

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 CVE-2014-8681, 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.5.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-89: Improper Neutralization of Special Elements used in an SQL Command ('SQL Injection'), where the product constructs all or part of an sql command using externally-influenced input from an upstream component, but it does not neutralize or incorrectly neutralizes special elements that could modify the intended sql command when it is sent to a downstream component. without sufficient removal or quoting of sql syntax in user-controllable inputs, the generated sql query can cause those inputs to be interpreted as sql instead of ordinary user data. 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

SQL injection vulnerability in the GetIssues function in models/issue.go in Gogs (aka Go Git Service) 0.3.1-9 through 0.5.6.x before 0.5.6.1025 Beta allows remote attackers to execute arbitrary SQL commands via the label parameter to user/repos/issues.

CVE-2014-8681 Affected Gogs.io/gogs Versions

2 component(s)
Fixed Versions:
0.5.8
Product / Package Ecosystem Affected Versions Fixed Version
gogs.io/gogs
Go
≥ 0.3.1
< 0.5.8
0.5.8
github.com/gogits/gogs
Go
≥ 0.3.1
< 0.5.8
0.5.8

References

Frequently Asked Questions

What is CVE-2014-8681?
CVE-2014-8681 is a security vulnerability in Gogs.io/gogs involving SQL Injection in gogs.io/gogs under CWE-89: Improper Neutralization of Special Elements used in an SQL Command ('SQL Injection').
Which Gogs.io/gogs versions are affected?
Affected versions include releases prior to 0.5.8 across affected packages: gogs.io/gogs, github.com/gogits/gogs.
What version fixes CVE-2014-8681?
Upgrading to 0.5.8 (or the latest patched release for your respective branch) resolves the vulnerability.
Is gogs.io/gogs affected?
Yes, gogs.io/gogs is affected in releases prior to 0.5.8. Upgrade your dependency to 0.5.8 or later.
Is github.com/gogits/gogs affected?
Yes, github.com/gogits/gogs is affected in releases prior to 0.5.8. Upgrade your dependency to 0.5.8 or later.
What is the CVSS score of CVE-2014-8681?
CVE-2014-8681 has a CVSS v3.1 base score of 6.5 (MODERATE) with vector string CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:C/C:L/I:L/A:L.
What CWE is associated with CVE-2014-8681?
CVE-2014-8681 is classified under CWE-89: Improper Neutralization of Special Elements used in an SQL Command ('SQL Injection') (The product constructs all or part of an SQL command using externally-influenced input from an upstream component, but it does not neutralize or incorrectly neutralizes special elements that could modify the intended SQL command when it is sent to a downstream component. Without sufficient removal or quoting of SQL syntax in user-controllable inputs, the generated SQL query can cause those inputs to be interpreted as SQL instead of ordinary user data.).
How can I check Go dependencies for CVE-2014-8681?
Run the dependency tree command: 'inspect dependencies for gogs.io/gogs'. This command lists direct and transitive dependencies in your build configuration so you can verify if a vulnerable version is resolved.
Machine-readable OSV JSON OSV v1.5 Schema
Normalized schema output
{
  "schema_version" : "1.4.0",
  "id" : "GHSA-mr6h-chqp-p9g2",
  "modified" : "2023-02-09T20:01:35Z",
  "published" : "2021-06-29T18:32:44Z",
  "aliases" : [ "CVE-2014-8681" ],
  "summary" : "SQL Injection in gogs.io/gogs",
  "details" : "SQL injection vulnerability in the GetIssues function in models/issue.go in Gogs (aka Go Git Service) 0.3.1-9 through 0.5.6.x before 0.5.6.1025 Beta allows remote attackers to execute arbitrary SQL commands via the label parameter to user/repos/issues.",
  "severity" : [ {
    "type" : "CVSS_V3",
    "score" : "CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:C/C:L/I:L/A:L"
  } ],
  "affected" : [ {
    "package" : {
      "ecosystem" : "Go",
      "name" : "gogs.io/gogs"
    },
    "ranges" : [ {
      "type" : "ECOSYSTEM",
      "events" : [ {
        "introduced" : "0.3.1"
      }, {
        "fixed" : "0.5.8"
      } ]
    } ]
  }, {
    "package" : {
      "ecosystem" : "Go",
      "name" : "github.com/gogits/gogs"
    },
    "ranges" : [ {
      "type" : "ECOSYSTEM",
      "events" : [ {
        "introduced" : "0.3.1"
      }, {
        "fixed" : "0.5.8"
      } ]
    } ]
  } ],
  "references" : [ {
    "type" : "ADVISORY",
    "url" : "https://nvd.nist.gov/vuln/detail/CVE-2014-8681"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/gogits/gogs/commit/83283bca4cb4e0f4ec48a28af680f0d88db3d2c8"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/gogs/gogs/commit/83283bca4cb4e0f4ec48a28af680f0d88db3d2c8"
  }, {
    "type" : "WEB",
    "url" : "https://exchange.xforce.ibmcloud.com/vulnerabilities/98695"
  }, {
    "type" : "PACKAGE",
    "url" : "https://github.com/gogits/gogs"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/gogits/gogs/releases/tag/v0.5.8"
  }, {
    "type" : "WEB",
    "url" : "https://pkg.go.dev/vuln/GO-2020-0021"
  }, {
    "type" : "WEB",
    "url" : "https://seclists.org/fulldisclosure/2014/Nov/31"
  }, {
    "type" : "WEB",
    "url" : "https://web.archive.org/web/20150711111508/http://gogs.io/docs/intro/change_log.html#v0.5.8-%40-2014-11-19"
  }, {
    "type" : "WEB",
    "url" : "https://web.nvd.nist.gov/view/vuln/detail?vulnId=CVE-2014-8681"
  }, {
    "type" : "WEB",
    "url" : "https://www.exploit-db.com/exploits/35237"
  }, {
    "type" : "WEB",
    "url" : "http://packetstormsecurity.com/files/129116/Gogs-Label-Search-Blind-SQL-Injection.html"
  }, {
    "type" : "WEB",
    "url" : "http://seclists.org/fulldisclosure/2014/Nov/31"
  } ],
  "database_specific" : {
    "cwe_ids" : [ "CWE-89" ],
    "severity" : "MODERATE",
    "github_reviewed" : true,
    "github_reviewed_at" : "2021-05-19T21:47:51Z",
    "nvd_published_at" : null
  }
}