You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: .github/ISSUE_TEMPLATE/bug_report.md
+2Lines changed: 2 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -7,6 +7,8 @@ assignees: ''
7
7
8
8
---
9
9
10
+
Do **not** use this template for undisclosed security issues—use **[Security advisories](https://github.com/sirstig/yokedcache/security/advisories/new)** instead. Known third-party notes (e.g. optional **diskcache** / **CVE-2025-69872**) are summarized in [`SECURITY.md`](https://github.com/sirstig/yokedcache/blob/main/SECURITY.md).
11
+
10
12
**Describe the bug**
11
13
A clear and concise description of what the bug is.
Copy file name to clipboardExpand all lines: CHANGELOG.md
+6Lines changed: 6 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -5,6 +5,12 @@ All notable changes to this project will be documented in this file.
5
5
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.1.0/),
6
6
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
7
7
8
+
## [Unreleased]
9
+
10
+
### Documentation
11
+
12
+
- Documented the optional **diskcache** advisory (**CVE-2025-69872** / [GHSA-w8v5-vhqr-4h9v](https://github.com/advisories/GHSA-w8v5-vhqr-4h9v)) in `SECURITY.md`, the README Security section, the docs site *Security* page, `CONTRIBUTING.md`, and the GitHub bug report template (no patched upstream wheel at the time of writing; trust boundaries and mitigations).
13
+
8
14
## [1.0.0] - 2026-03-23
9
15
10
16
First stable 1.x release. Published as **1.0.0** (not a PEP 440 pre-release) so a plain `pip install yokedcache` resolves to this line ahead of 0.x. Focus: security hardening, safer Redis usage, and clearer HTTP cache semantics.
Copy file name to clipboardExpand all lines: CONTRIBUTING.md
+4Lines changed: 4 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -219,6 +219,10 @@ yokedcache/
219
219
-**Discussions:** Use GitHub Discussions for questions
220
220
-**Chat:** Join our community chat (link TBD)
221
221
222
+
## Security
223
+
224
+
Report vulnerabilities through [GitHub Security Advisories](https://github.com/sirstig/yokedcache/security/advisories/new). Maintainer-facing notes on trust boundaries, optional backends, and known third-party advisories (including **diskcache** / **CVE-2025-69872** for the optional `disk` extra) live in **[SECURITY.md](SECURITY.md)** in the repository root.
225
+
222
226
## Code of Conduct
223
227
224
228
By participating in this project, you agree to abide by our Code of Conduct:
Copy file name to clipboardExpand all lines: README.md
+5-3Lines changed: 5 additions & 3 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -24,13 +24,13 @@ Async-first Python caching for FastAPI and other asyncio services: Redis-oriente
24
24
25
25
## Installation
26
26
27
-
Current stable line:**1.0.0**(default on PyPI).
27
+
Install the latest**1.x**from PyPI; you do not need to pin an exact version unless your policy requires it.
28
28
29
29
```bash
30
30
pip install yokedcache
31
31
```
32
32
33
-
To require 1.x or newer:
33
+
To require 1.x or newer explicitly:
34
34
35
35
```bash
36
36
pip install "yokedcache>=1.0.0"
@@ -86,7 +86,9 @@ Other backends impose their own dependencies when you install the matching extra
86
86
87
87
## Security
88
88
89
-
Treat Redis and Memcached as **trusted** stores: anyone who can write arbitrary keys can affect deserialization. From **1.0.0**, new values are written with a typed envelope; set `allow_legacy_insecure_deserialization=False` on `CacheConfig` once legacy entries are migrated. Do not use `HTTPCacheMiddleware` on authenticated routes without a `key_builder` that varies the key per user or session. See the changelog for details. The **[SECURITY.md](SECURITY.md)** file covers the optional disk backend (pickle / `diskcache`) and how we pin vulnerable transitive deps in `uv.lock`.
89
+
Treat Redis and Memcached as **trusted** stores: anyone who can write arbitrary keys can affect deserialization. From **1.0.0**, new values are written with a typed envelope; set `allow_legacy_insecure_deserialization=False` on `CacheConfig` once legacy entries are migrated. Do not use `HTTPCacheMiddleware` on authenticated routes without a `key_builder` that varies the key per user or session. See the changelog for details.
90
+
91
+
**Optional `disk` extra:** installs **diskcache**, which uses **pickle** by default. **[CVE-2025-69872](https://github.com/advisories/GHSA-w8v5-vhqr-4h9v)** (GHSA-w8v5-vhqr-4h9v) documents unsafe pickle deserialization when an attacker can write the cache directory; **there is no patched diskcache release on PyPI yet**, so dependency scanners may still alert. Use a non-world-writable cache path and skip `yokedcache[disk]` if you do not need disk persistence. Full write-up: **[SECURITY.md](SECURITY.md)** (also covers how we pin transitive deps in `uv.lock`).
Copy file name to clipboardExpand all lines: SECURITY.md
+21-1Lines changed: 21 additions & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -5,7 +5,27 @@ Report vulnerabilities via [GitHub Security Advisories](https://github.com/sirst
5
5
## Trust boundaries
6
6
7
7
-**Redis / Memcached**: Treat as trusted stores. Anyone who can write arbitrary keys can influence what your app deserializes. Use `CacheConfig.allow_legacy_insecure_deserialization=False` once legacy blobs are gone (see changelog).
8
-
-**Disk backend (`yokedcache[disk]`)**: The optional `diskcache` library persists values with **pickle** by default. There is **no patched diskcache release** yet for [CVE-2025-69872](https://github.com/advisories/GHSA-w8v5-vhqr-4h9v) (unsafe pickle deserialization if an attacker can write the cache directory). Only use the disk extra when the cache directory is **not writable by untrusted users**; prefer JSON/msgpack serialization at the application layer where feasible.
8
+
9
+
## Optional disk backend (`diskcache`)
10
+
11
+
The **`yokedcache[disk]`** extra pulls in **[diskcache](https://pypi.org/project/diskcache/)** (python-diskcache). That library persists values with **pickle** by default.
|**Affected**| diskcache **through 5.6.3** (current PyPI line as of this writing) |
17
+
|**Patched PyPI version**|**None** yet; automated scanners may flag the dependency until upstream ships a release |
18
+
19
+
**Threat model:** someone who can **write or replace files under the cache directory** can supply a malicious pickle payload; when your process reads that entry, that can lead to **arbitrary code execution**.
20
+
21
+
**What we recommend**
22
+
23
+
- Do **not** install the disk extra unless you need a filesystem-backed cache.
24
+
- Keep the cache directory **writable only by the application user** (no shared multi-tenant paths, no world-writable directories, careful with network mounts).
25
+
- Prefer **Redis, SQLite, or memory** backends when untrusted parties could influence the filesystem.
26
+
- At the application layer, only cache payloads you could treat as **trusted after deserialization**; JSON or msgpack at the boundary does not remove the pickle risk inside diskcache until you stop using pickle-backed storage for those keys.
27
+
28
+
**Upstream note:** diskcache also provides **`JSONDisk`** (JSON + zlib instead of pickle). **YokedCache’s `DiskCacheBackend`** currently constructs `diskcache.Cache` with the default disk (pickle). Callers who require disk without pickle need a custom integration or another backend until this project exposes a supported switch.
Copy file name to clipboardExpand all lines: site-src/pages/security.md
+1Lines changed: 1 addition & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -1,6 +1,7 @@
1
1
# Security
2
2
3
3
-**Versions:** 1.x targets **Python 3.10+** (CI covers through **3.14**). On **Python 3.9**, use **`yokedcache==0.3.0`** (or `yokedcache<1`) only as a stopgap—that branch does **not** receive the same security fixes as 1.x; upgrade when you can. Details: [SECURITY.md](https://github.com/sirstig/yokedcache/blob/main/SECURITY.md) in the repo.
4
+
-**Optional disk extra (`diskcache`):** the `yokedcache[disk]` extra depends on **diskcache**, which serializes with **pickle** by default. **[CVE-2025-69872](https://github.com/advisories/GHSA-w8v5-vhqr-4h9v)** describes arbitrary code execution if an attacker can write under the cache directory. **No patched PyPI release** is available yet; scanners may flag the package. Prefer strict filesystem permissions, avoid the extra if you do not need disk caching, and read the **Disk / diskcache** section in [SECURITY.md](https://github.com/sirstig/yokedcache/blob/main/SECURITY.md).
4
5
- Use `rediss://` and TLS-enabled Redis in production.
5
6
- Limit Redis access to your VPC/private network; avoid public endpoints.
6
7
- For multi-tenant apps, include tenant namespace in keys and enforce isolation.
0 commit comments