Skip to content

SQL injection vulnerability

High
pixelmaxQm published GHSA-gf3r-h744-mqgp Jun 16, 2024

Package

gomod github.com/flipped-aurora/gin-vue-admin/server (Go)

Affected versions

< 2.6.6

Patched versions

2.6.6

Description

Impact

Gin-vue-admin <= v2.6.5 has SQL injection vulnerability。
SQL injection vulnerabilities occur when a web application allows users to input data into SQL queries without sufficiently validating or sanitizing the input. Failing to properly enforce restrictions on user input could mean that even a basic form input field can be used to inject arbitrary and potentially dangerous SQL commands. This could lead to unauthorized access to the database, data leakage, data manipulation, or even complete compromise of the database server.

Patches

53d0338

For more information

Affect Api: /api/sysExportTemplate/exportExcel

Affect Param: order

Affect File: server/service/system/sys_export_template.go

Affect Function: SysExportTemplateService.ExportExcel

func (sysExportTemplateService *SysExportTemplateService) ExportExcel(templateID string, values url.Values) (file *bytes.Buffer, name string, err error) {
    // ...
	// input param `order`
	order := values.Get("order")
	if order != "" {
		db = db.Order(order)
	}
    // ...
}

PoC:

1718246118501

Severity

High

CVSS overall score

This score calculates overall vulnerability severity from 0 to 10 and is based on the Common Vulnerability Scoring System (CVSS).
/ 10

CVSS v3 base metrics

Attack vector
Network
Attack complexity
Low
Privileges required
Low
User interaction
None
Scope
Unchanged
Confidentiality
High
Integrity
High
Availability
High

CVSS v3 base metrics

Attack vector: More severe the more the remote (logically and physically) an attacker can be in order to exploit the vulnerability.
Attack complexity: More severe for the least complex attacks.
Privileges required: More severe if no privileges are required.
User interaction: More severe when no user interaction is required.
Scope: More severe when a scope change occurs, e.g. one vulnerable component impacts resources in components beyond its security scope.
Confidentiality: More severe when loss of data confidentiality is highest, measuring the level of data access available to an unauthorized user.
Integrity: More severe when loss of data integrity is the highest, measuring the consequence of data modification possible by an unauthorized user.
Availability: More severe when the loss of impacted component availability is highest.
CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H

CVE ID

CVE-2024-37896

Weaknesses