GHSA-9PG5-8C7X-5HFX
Vulnerability from github – Published: 2026-10-30 14:54 – Updated: 2026-10-30 14:54Summary
joserfc 1.7.4 defines compact-JWS header, payload, and signature limits, but
calls value.split(b".") before validating them. Python bytes.split() copies
the attacker-controlled segments, so the current guard allocates roughly one
complete payload before rejecting it.
Reproduction
.venv-research/bin/python 06-practical-testing/preauth-memory-profile.py
The input is resident before a fork-isolated verifier runs, and every signature is invalid.
| Input | Peak RSS delta | Amplification | Result |
|---|---|---|---|
| 1 MiB | 1.11 MiB | 1.11× | size rejected |
| 4 MiB | 4.04 MiB | 1.01× | size rejected |
| 8 MiB | 8.04 MiB | 1.01× | size rejected |
| 16 MiB | 16.04 MiB | 1.00× | size rejected |
| 32 MiB | 31.74 MiB | 0.99× | size rejected |
| 64 MiB | 63.80 MiB | 1.00× | size rejected |
The unconstrained profile is the primary evidence: joserfc allocates an
additional attacker-sized object before producing its intended
ExceededSizeError. A separate baseline-plus-headroom stress test raises
MemoryError when that copy cannot fit, but this report does not characterize
an absolute RLIMIT_AS value as a realistic worker memory budget.
Security Argument
The issue is not that joserfc can prevent the transport layer from receiving a
large header. The issue is narrower: once bytes reach deserialize_compact(),
the library's existing size guard cannot fulfill its allocation-limiting purpose
because attacker-controlled segment copies are created first.
This differs from GHSA-frfh-8v73-gjg4, which concerned embedding already-loaded oversized segments in exception and log messages. Here, the current implementation itself creates an additional payload-sized allocation before its fixed size exception.
Recommended Fix
Check len(value) against a maximum compact-serialization size before
split(). If per-segment diagnostics are needed, locate delimiters with bounded
find() operations or memory views, validate offsets and lengths, and only then
materialize acceptable segments.
{
"affected": [
{
"package": {
"ecosystem": "PyPI",
"name": "joserfc"
},
"ranges": [
{
"events": [
{
"introduced": "0"
},
{
"fixed": "1.7.6"
}
],
"type": "ECOSYSTEM"
}
]
}
],
"aliases": [
"CVE-2026-119284"
],
"database_specific": {
"cwe_ids": [
"CWE-400"
],
"github_reviewed": true,
"github_reviewed_at": "2026-10-30T14:54:25Z",
"nvd_published_at": "2026-10-29T22:17:01Z",
"severity": "MODERATE"
},
"details": "## Summary\n\njoserfc 1.7.4 defines compact-JWS header, payload, and signature limits, but\ncalls `value.split(b\".\")` before validating them. Python `bytes.split()` copies\nthe attacker-controlled segments, so the current guard allocates roughly one\ncomplete payload before rejecting it.\n\n## Reproduction\n\n```bash\n.venv-research/bin/python 06-practical-testing/preauth-memory-profile.py\n```\n\nThe input is resident before a fork-isolated verifier runs, and every signature\nis invalid.\n\n| Input | Peak RSS delta | Amplification | Result |\n|---:|---:|---:|---|\n| 1 MiB | 1.11 MiB | 1.11\u00d7 | size rejected |\n| 4 MiB | 4.04 MiB | 1.01\u00d7 | size rejected |\n| 8 MiB | 8.04 MiB | 1.01\u00d7 | size rejected |\n| 16 MiB | 16.04 MiB | 1.00\u00d7 | size rejected |\n| 32 MiB | 31.74 MiB | 0.99\u00d7 | size rejected |\n| 64 MiB | 63.80 MiB | 1.00\u00d7 | size rejected |\n\nThe unconstrained profile is the primary evidence: joserfc allocates an\nadditional attacker-sized object before producing its intended\n`ExceededSizeError`. A separate baseline-plus-headroom stress test raises\n`MemoryError` when that copy cannot fit, but this report does not characterize\nan absolute `RLIMIT_AS` value as a realistic worker memory budget.\n\n## Security Argument\n\nThe issue is not that joserfc can prevent the transport layer from receiving a\nlarge header. The issue is narrower: once bytes reach `deserialize_compact()`,\nthe library\u0027s existing size guard cannot fulfill its allocation-limiting purpose\nbecause attacker-controlled segment copies are created first.\n\nThis differs from\n[GHSA-frfh-8v73-gjg4](https://github.com/authlib/joserfc/security/advisories/GHSA-frfh-8v73-gjg4),\nwhich concerned embedding already-loaded oversized segments in exception and log\nmessages. Here, the current implementation itself creates an additional\npayload-sized allocation before its fixed size exception.\n\n## Recommended Fix\n\nCheck `len(value)` against a maximum compact-serialization size before\n`split()`. If per-segment diagnostics are needed, locate delimiters with bounded\n`find()` operations or memory views, validate offsets and lengths, and only then\nmaterialize acceptable segments.",
"id": "GHSA-9pg5-8c7x-5hfx",
"modified": "2026-10-30T14:54:25Z",
"published": "2026-10-30T14:54:25Z",
"references": [
{
"type": "WEB",
"url": "https://github.com/authlib/joserfc/security/advisories/GHSA-9pg5-8c7x-5hfx"
},
{
"type": "ADVISORY",
"url": "https://nvd.nist.gov/vuln/detail/CVE-2026-119284"
},
{
"type": "WEB",
"url": "https://github.com/authlib/joserfc/commit/397e04f4bbce0b94d86e31c1c003f4640af8fb39"
},
{
"type": "PACKAGE",
"url": "https://github.com/authlib/joserfc"
},
{
"type": "WEB",
"url": "https://github.com/authlib/joserfc/releases/tag/1.7.6"
}
],
"schema_version": "1.4.0",
"severity": [
{
"score": "CVSS:4.0/AV:N/AC:L/AT:N/PR:N/UI:N/VC:N/VI:N/VA:L/SC:N/SI:N/SA:N",
"type": "CVSS_V4"
}
],
"summary": "joserfc: Compact JWS size guard allocates attacker-controlled segments before rejection"
}
Drag nodes to arrange them. Double-click a related vulnerability to open it, or a source to visit its link. The Physics button on the left tunes the layout and the simulation; the legend at the bottom left hides or shows nodes by kind and by sighting type.
Sightings
| Author | Source | Type | Date | Other |
|---|
Nomenclature
- Seen: The vulnerability was mentioned, discussed, or observed by the user.
- Confirmed: The vulnerability has been validated from an analyst's perspective.
- Published Proof of Concept: A public proof of concept is available for this vulnerability.
- Exploited: The vulnerability was observed as exploited by the user who reported the sighting.
- Patched: The vulnerability was observed as successfully patched by the user who reported the sighting.
- Not exploited: The vulnerability was not observed as exploited by the user who reported the sighting.
- Not confirmed: The user expressed doubt about the validity of the vulnerability.
- Not patched: The vulnerability was not observed as successfully patched by the user who reported the sighting.
Vulnerability timeline
Sightings and recorded dates, grouped by day · UTC
Loading timeline…
The approach is described in our paper Mapping CVEs to MITRE ATT&CK Techniques: A Curated Gold-Set Classifier and the Limits of LLM-Assisted Label Expansion.
Browse all ATT&CK techniques and the vulnerabilities related to each.
Related by attack behaviour
Vulnerabilities whose description is nearest to this one in the vector space of the CIRCL/vulnerability-attack-technique-biencoder model. This is a similarity search over the bi-encoder space (plain cosine), not a classification, and it has no measured accuracy.