Skip to content

PagerMaid-Pyro web token leaks

Critical
omg-xtao published GHSA-w8pq-5mrm-qfgq Sep 22, 2024

Package

PagerMaid-Pyro

Affected versions

< 1.4.14

Patched versions

1.4.14

Description

Summary

When using the web control panel, the home page will hardcode the token string, and this behavior leads to leakage of the token.

PoC

Since the Log component of the amis template does not use a global adapter, it cannot automatically add tokens to the headers. A hard-coded token string is used to solve this problem when building the home page.

"headers": {"token": Config.WEB_SECRET_KEY},

"source": {
  "url": "/pagermaid/api/log?num=${log_num | raw}",
  "method": "get",
  "dataType": "json",
  "qsOptions": {
    "arrayFormat": "indices",
    "encodeValuesOnly": true
  },
  "headers": {
    "token": "${token}"
  },
  "replaceData": false
},

The issue was successfully resolved after using this method. It also causes a leak in the token string.

The workaround is to work around this by also using a cookie to validate the token string passed on the user's side.

Impact

The web console token has been compromised, affecting all users who have the web console open and publicly accessible

Patches

This issue has been resolved, please update to version 1.4.14.

Workarounds

It is recommended that you upgrade to the latest version, if you do not want to upgrade, please close the web console or disable public access.

Severity

Critical

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
None
User interaction
None
Scope
Changed
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:N/UI:N/S:C/C:H/I:H/A:H

CVE ID

No known CVE

Weaknesses

No CWEs

Credits