GHSA-hcvp-2cc7-jrwr

Suggest an improvement
Source
https://github.com/advisories/GHSA-hcvp-2cc7-jrwr
Import Source
https://github.com/github/advisory-database/blob/main/advisories/github-reviewed/2024/01/GHSA-hcvp-2cc7-jrwr/GHSA-hcvp-2cc7-jrwr.json
JSON Data
https://api.test.osv.dev/v1/vulns/GHSA-hcvp-2cc7-jrwr
Aliases
Published
2024-01-23T12:50:59Z
Modified
2024-09-13T17:45:53.801680Z
Severity
  • 3.7 (Low) CVSS_V3 - CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:L/I:N/A:N CVSS Calculator
  • 1.7 (Low) CVSS_V4 - CVSS:4.0/AV:N/AC:L/AT:P/PR:N/UI:N/VC:L/VI:N/VA:N/SC:N/SI:N/SA:N/E:U CVSS Calculator
Summary
changedetection.io API endpoint is not secured with API token
Details

Summary

API endpoint /api/v1/watch/<uuid>/history can be accessed by any unauthorized user.

Details

WatchHistory resource does not have @auth.check_token annotation, which means it can be accessed without providing x-api-key header.

https://github.com/dgtlmoon/changedetection.io/blob/9510345e01ea8e308c339163d8e8b030ce5ac7f1/changedetectionio/api/api_v1.py#L129-L156

PoC

  1. Get list of watch with x-api-key:
    $ curl -H "x-api-key: apikeyhere" http://localhost:5000/api/v1/watch
    {"uuid": ...}
    
  2. Call for history of snapshots without x-api-key. Expected - 401/403 error. Actual - list of snapshots is listed.
    $ curl http://localhost:5000/api/v1/watch/uuid/history
    {"timestamp": "/path/to/snapshot.txt"}
    

Impact

Anybody can check one's watch history. However, because unauthorized party first needs to know watch UUID, and the watch history endpoint itself returns only paths to the snapshot on the server, an impact on users' data privacy is minimal.

Database specific
{
    "nvd_published_at": "2024-01-19T20:15:13Z",
    "cwe_ids": [
        "CWE-863"
    ],
    "severity": "LOW",
    "github_reviewed": true,
    "github_reviewed_at": "2024-01-23T12:50:59Z"
}
References

Affected packages

PyPI / changedetection-io

Package

Name
changedetection-io
View open source insights on deps.dev
Purl
pkg:pypi/changedetection-io

Affected ranges

Type
ECOSYSTEM
Events
Introduced
0.39.14
Fixed
0.45.13

Affected versions

0.*

0.39.14
0.39.14.1
0.39.15
0.39.16
0.39.17
0.39.17.1
0.39.17.2
0.39.18
0.39.19
0.39.19.1
0.39.20
0.39.20.1
0.39.20.2
0.39.20.3
0.39.20.4
0.39.21
0.39.21.1
0.39.22
0.39.22.1
0.40.0
0.40.0.1
0.40.0.2
0.40.0.3
0.40.0.4
0.40.1.0
0.40.1.1
0.40.2
0.40.3
0.41
0.41.1
0.42
0.42.1
0.42.2
0.42.3
0.43.1
0.43.2
0.44
0.44.1
0.45
0.45.1
0.45.2
0.45.3
0.45.4
0.45.5
0.45.6
0.45.7
0.45.7.1
0.45.7.2
0.45.7.3
0.45.8
0.45.8.1
0.45.9
0.45.11
0.45.12

Database specific

{
    "last_known_affected_version_range": "<= 0.45.12"
}