Skip to content
This repository was archived by the owner on Dec 28, 2023. It is now read-only.

Deserialization Vulnerability by evil yaml config input (SnakeYAML)

Moderate
4ra1n published GHSA-39pv-4vmj-c4fr Nov 24, 2022

Package

super-xray (super-xray)

Affected versions

0.6-beta and below

Patched versions

0.7

Description

Severity

  • 安全级别:Moderate
  • 攻击向量:本地
  • 攻击复杂度:低
  • 需要权限:高
  • 用户交互:是
  • 范围:无更改
  • 机密性影响:高
  • 完整性影响:高
  • 可用性影响:高

Vendor

super-xray

Versions Affected

0.6-beta and below

Description

SnakeYAML RCE

ScreenShot:

PoC:

!!javax.script.ScriptEngineManager [
  !!java.net.URLClassLoader [[
    !!java.net.URL ["file:./yaml.jar"]
  ]]
]

Fix:

Yaml yaml = new Yaml(new SafeConstructor(new LoaderOptions()));

Mitigation

users should upgrade to super-xray 0.7

Credit

This issue was discovered by super-xray development team

Severity

Moderate

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
Local
Attack complexity
Low
Privileges required
High
User interaction
Required
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:L/AC:L/PR:H/UI:R/S:U/C:H/I:H/A:H

CVE ID

CVE-2022-41958

Weaknesses