Security
Headlines
HeadlinesLatestCVEs

Headline

CVE-2022-35919: do not allow filesystem fallback in server download (#15429) · minio/minio@bc72e42

MinIO is a High Performance Object Storage released under GNU Affero General Public License v3.0. In affected versions all ‘admin’ users authorized for admin:ServerUpdate can selectively trigger an error that in response, returns the content of the path requested. Any normal OS system would allow access to contents at any arbitrary paths that are readable by MinIO process. Users are advised to upgrade. Users unable to upgrade may disable ServerUpdate API by denying the admin:ServerUpdate action for your admin users via IAM policies.

CVE
#auth

@@ -291,63 +291,50 @@ func getUserAgent(mode string) string { }
func downloadReleaseURL(u *url.URL, timeout time.Duration, mode string) (content string, err error) { var reader io.ReadCloser if u.Scheme == “https” || u.Scheme == “http” { req, err := http.NewRequest(http.MethodGet, u.String(), nil) if err != nil { return content, AdminError{ Code: AdminUpdateUnexpectedFailure, Message: err.Error(), StatusCode: http.StatusInternalServerError, } req, err := http.NewRequest(http.MethodGet, u.String(), nil) if err != nil { return content, AdminError{ Code: AdminUpdateUnexpectedFailure, Message: err.Error(), StatusCode: http.StatusInternalServerError, } req.Header.Set("User-Agent", getUserAgent(mode)) } req.Header.Set("User-Agent", getUserAgent(mode))
client := &http.Client{Transport: getUpdateTransport(timeout)} resp, err := client.Do(req) if err != nil { if xnet.IsNetworkOrHostDown(err, false) { return content, AdminError{ Code: AdminUpdateURLNotReachable, Message: err.Error(), StatusCode: http.StatusServiceUnavailable, } } client := &http.Client{Transport: getUpdateTransport(timeout)} resp, err := client.Do(req) if err != nil { if xnet.IsNetworkOrHostDown(err, false) { return content, AdminError{ Code: AdminUpdateUnexpectedFailure, Code: AdminUpdateURLNotReachable, Message: err.Error(), StatusCode: http.StatusInternalServerError, StatusCode: http.StatusServiceUnavailable, } } if resp == nil { return content, AdminError{ Code: AdminUpdateUnexpectedFailure, Message: fmt.Sprintf("No response from server to download URL %s", u), StatusCode: http.StatusInternalServerError, } return content, AdminError{ Code: AdminUpdateUnexpectedFailure, Message: err.Error(), StatusCode: http.StatusInternalServerError, } reader = resp.Body defer xhttp.DrainBody(resp.Body)
if resp.StatusCode != http.StatusOK { return content, AdminError{ Code: AdminUpdateUnexpectedFailure, Message: fmt.Sprintf("Error downloading URL %s. Response: %v", u, resp.Status), StatusCode: resp.StatusCode, } } if resp == nil { return content, AdminError{ Code: AdminUpdateUnexpectedFailure, Message: fmt.Sprintf("No response from server to download URL %s", u), StatusCode: http.StatusInternalServerError, } } else { reader, err = os.Open(u.Path) if err != nil { return content, AdminError{ Code: AdminUpdateURLNotReachable, Message: err.Error(), StatusCode: http.StatusServiceUnavailable, } } defer xhttp.DrainBody(resp.Body)
if resp.StatusCode != http.StatusOK { return content, AdminError{ Code: AdminUpdateUnexpectedFailure, Message: fmt.Sprintf("Error downloading URL %s. Response: %v", u, resp.Status), StatusCode: resp.StatusCode, } }
contentBytes, err := ioutil.ReadAll(reader) contentBytes, err := ioutil.ReadAll(resp.Body) if err != nil { return content, AdminError{ Code: AdminUpdateUnexpectedFailure,

Related news

Minio 2022-07-29T19-40-48Z Path Traversal

Minio version 2022-07-29T19-40-48Z suffers from a path traversal vulnerability.

CVE: Latest News

CVE-2023-50976: Transactions API Authorization by oleiman · Pull Request #14969 · redpanda-data/redpanda