Skip to content

Commit e590650

Browse files
authored
Merge pull request #2 from puppetlabs/cve-2018-6508_
(PE-23473) fix for cve-2018-6508
2 parents 6871a9f + da3684c commit e590650

File tree

3 files changed

+13
-6
lines changed

3 files changed

+13
-6
lines changed

CHANGELOG.md

+7
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,13 @@
33
All notable changes to this project will be documented in this file. The format is based on [Keep a Changelog](http://keepachangelog.com/en/1.0.0/)
44
and this project adheres to [Semantic Versioning](http://semver.org).
55

6+
## Supported Release [5.2.1]
7+
### Summary
8+
This release fixes CVE-2018-6508 which is a potential arbitrary code execution via tasks.
9+
10+
### Fixed
11+
- Fix export and mysql tasks for arbitrary remote code
12+
613
## Supported Release [5.2.0]
714

815
### Added

metadata.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "puppetlabs-mysql",
3-
"version": "5.2.0",
3+
"version": "5.2.1",
44
"author": "Puppet Labs",
55
"summary": "Installs, configures, and manages the MySQL service.",
66
"license": "Apache-2.0",

tasks/sql.rb

+5-5
Original file line numberDiff line numberDiff line change
@@ -4,11 +4,11 @@
44
require 'puppet'
55

66
def get(sql, database, user, password)
7-
cmd_string = "mysql -e \"#{sql}\""
8-
cmd_string << " --database=#{database}" unless database.nil?
9-
cmd_string << " --user=#{user}" unless user.nil?
10-
cmd_string << " --password=#{password}" unless password.nil?
11-
stdout, _stderr, status = Open3.capture3(cmd_string)
7+
cmd = ['mysql', '-e', sql]
8+
cmd << " --database=#{database}" unless database.nil?
9+
cmd << " --user=#{user}" unless user.nil?
10+
cmd << " --password=#{password}" unless password.nil?
11+
stdout, _stderr, status = Open3.capture3(*cmd)
1212
raise Puppet::Error, _("stderr: ' %{stderr}') % { stderr: stderr }") if status != 0
1313
{ status: stdout.strip }
1414
end

0 commit comments

Comments
 (0)