Skip to content

Commit de24b56

Browse files
1 parent 79f4ee8 commit de24b56

File tree

2 files changed

+149
-0
lines changed

2 files changed

+149
-0
lines changed
Lines changed: 57 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,57 @@
1+
{
2+
"schema_version": "1.4.0",
3+
"id": "GHSA-5mrf-j8v6-f45g",
4+
"modified": "2025-11-18T18:24:27Z",
5+
"published": "2025-11-18T18:24:26Z",
6+
"aliases": [
7+
"CVE-2025-65014"
8+
],
9+
"summary": "LibreNMS has Weak Password Policy",
10+
"details": "## Summary\n\nA **Weak Password Policy** vulnerability was identified in the user management functionality of the _LibreNMS_ application. This vulnerability allows administrators to create accounts with extremely weak and predictable passwords, such as `12345678`. This exposes the platform to brute-force and credential stuffing attacks.\n\n---\n\n## Details\n\n**Vulnerable Component:** User creation / password definition\n\nThe application fails to enforce a strong password policy when creating new users. As a result, administrators can define trivial and well-known weak passwords, compromising the authentication security of the system.\n\n---\n\n## PoC\n\n1. Log in to the application using an **Administrator** account.\n \n2. Navigate to the user management section: \n \n3. Create a new user account using the password `12345678`.\n \n\n<img width=\"1103\" height=\"852\" alt=\"image\" src=\"https://github.com/user-attachments/assets/a20d4226-9f86-46ee-a4e6-45be91bb6b7b\" />\n\n4. The application accepts the weak password without restrictions and creates the account successfully.\n \n<img width=\"1359\" height=\"487\" alt=\"image\" src=\"https://github.com/user-attachments/assets/9bec15bf-b38f-448b-8f98-acca5724e143\" />\n\n---\n\n## Impact\n\nWeak password policy vulnerabilities can have severe consequences, including:\n\n- Increased risk of brute-force and credential stuffing attacks\n \n- Unauthorized access to user or administrative accounts\n \n- Privilege escalation through compromised credentials\n \n- Degradation of the overall security posture of the platform\n \n\n---\n\n## Mitigation\n\n- Enforce a strong password policy (e.g., minimum of 12 characters with uppercase, lowercase, digits, and special characters).\n \n- Block the use of commonly known weak passwords (e.g., `12345678`, `password`, `admin`, `qwerty`).",
11+
"severity": [
12+
{
13+
"type": "CVSS_V3",
14+
"score": "CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:L/I:N/A:N"
15+
}
16+
],
17+
"affected": [
18+
{
19+
"package": {
20+
"ecosystem": "Packagist",
21+
"name": "librenms/librenms"
22+
},
23+
"ranges": [
24+
{
25+
"type": "ECOSYSTEM",
26+
"events": [
27+
{
28+
"introduced": "0"
29+
},
30+
{
31+
"fixed": "25.11.0"
32+
}
33+
]
34+
}
35+
]
36+
}
37+
],
38+
"references": [
39+
{
40+
"type": "WEB",
41+
"url": "https://github.com/librenms/librenms/security/advisories/GHSA-5mrf-j8v6-f45g"
42+
},
43+
{
44+
"type": "PACKAGE",
45+
"url": "https://github.com/librenms/librenms"
46+
}
47+
],
48+
"database_specific": {
49+
"cwe_ids": [
50+
"CWE-521"
51+
],
52+
"severity": "LOW",
53+
"github_reviewed": true,
54+
"github_reviewed_at": "2025-11-18T18:24:26Z",
55+
"nvd_published_at": null
56+
}
57+
}
Lines changed: 92 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,92 @@
1+
{
2+
"schema_version": "1.4.0",
3+
"id": "GHSA-frfh-8v73-gjg4",
4+
"modified": "2025-11-18T18:26:05Z",
5+
"published": "2025-11-18T18:26:04Z",
6+
"aliases": [
7+
"CVE-2025-65015"
8+
],
9+
"summary": "joserfc has Possible Uncontrolled Resource Consumption Vulnerability Triggered by Logging Arbitrarily Large JWT Token Payloads",
10+
"details": "### Summary\nThe `ExceededSizeError` exception messages are embedded with non-decoded JWT token parts and may cause Python logging to record an arbitrarily large, forged JWT payload.\n\n### Details\nIn situations where a misconfigured — or entirely absent — production-grade web server sits in front of a Python web application, an attacker may be able to send arbitrarily large bearer tokens in the HTTP request headers. When this occurs, Python logging or diagnostic tools (e.g., Sentry) may end up processing extremely large log messages containing the full JWT header during the `joserfc.jwt.decode()` operation. The same behavior also appears when validating claims and signature payload sizes, as the library raises `joserfc.errors.ExceededSizeError()` with the full payload embedded in the exception message. Since the payload is already fully loaded into memory at this stage, the library cannot prevent or reject it per se.\n\nIt is therefore the responsibility of the underlying web server (`uvicorn`/`h11`, `gunicorn`, `Starlette`, `Werkzeug`, `nginx`...etc) to enforce limits on header sizes. For example, a `FastAPI`/`Starlette` application running _without_ `uvicorn` and/or `gunicorn` cannot enforce header size limits on its own. With `uvicorn`/`h11`, the [--h11-max-incomplete-event-size <int>](https://uvicorn.dev/settings/#implementation:~:text=%2D%2Dh11%2Dmax%2Dincomplete%2Devent%2Dsize%20%3Cint%3E) option can restrict the total size of the header _plus_ body, but not the header alone. Similarly, [vLLM serve](https://docs.vllm.ai/en/latest/cli/serve/#-h11-max-incomplete-event-size) —due to its reliance on `uvicorn`/`h11` and the need for heavy data transfer in ML inference workloads, sets a default limit of 4 MB for header _plus_ body and is frequently increased. In practice, a robust reverse proxy (such as `nginx`) is typically required because it can explicitly cap maximum header size. Unfortunately, many web applications do not run behind a proper reverse proxy.\n\nGiven these constraints, the `joserfc` library cannot safely log or embed payloads of arbitrary size. This issue is particularly subtle, as it occurs only when a maliciously crafted JWT finally reaches the Python application, a scenario that most developers will never encounter during routine development and testing.\n\n### PoC\n**Environment**\nUbuntu 24.04 LTS\nPython 3.12\nTested on `joserfc` version `1.4.1`\n\n```python\n\nimport logging\nfrom datetime import UTC, datetime, timedelta\n\nfrom joserfc import jwt\nfrom joserfc.errors import ExceededSizeError, UnsupportedAlgorithmError\nfrom joserfc.jwk import OctKey\n\n\nlogger = logging.getLogger(__name__)\n\n\nSECRET_KEY = \"8c13bd66babc241b29f8553429bdab7deb6f5b74ddfda7765471e57ecd55641e\"\nLONG_JWT_TOKEN = (\n \"eyJ0eXAiOiJKV1QiLCJhbGciOiJSUzI1NmRkZGRkZGRkZGRkZGRkZGRkZGRkZGRkZGRkZGRkZGRkZGRkZGRkZGRkZGRkZGRkZGRkZGRkZGRkZGRkZGRkZGRSUzI1NmRkZGRkZGRkZGRkZGRkZGRkZGRkZGRkZGRkZGRkZGRkZGRkZGRkZGRkZGRkZGRkZGRkZGRkZGRkZGRkZGRkZGRSUzI1NmRkZGRkZGRkZGRkZGRkZGRkZGRkZGRkZGRkZGRkZGRkZGRkZGRkZGRkZGRkZGRkZGRkZGRkZGRkZGRkZGRkZGRSUzI1NmRkZGRkZGRkZGRkZGRkZGRkZGRkZGRkZGRkZGRkZGRkZGRkZGRkZGRkZGRkZGRkZGRkZGRkZGRkZGRkZGRkZGRSUzI1NmRkZGRkZGRkZGRkZGRkZGRkZGRkZGRkZGRkZGRkZGRkZGRkZGRkZGRkZGRkZGRkZGRkZGRkZGRkZGRkZGRkZGRSUzI1NmRkZGRkZGRkZGRkZGRkZGRkZGRkZGRkZGRkZGRkZGRkZGRkZGRkZGRkZGRkZGRkZGRkZGRkZGRkZGRkZGRkZGQifQ\"\n \".\"\n \"eyJpc3MiOiJhdXRoX3NlcnZlciIsImlhdCI6MTc2MzI0OTEwMSwiZXhwIjoxNzY5MjQ5MTAxfQ\"\n \".\"\n \"6-k2jmkGXD6wXOgYgjPS8E5lS_GjWpgIuY54gokjAn8\"\n)\n\nHEADER = {\n \"alg\": (\n \"RS256dddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddd\"\n \"RS256dddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddd\"\n \"RS256dddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddd\"\n \"RS256dddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddd\"\n \"RS256dddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddd\"\n \"RS256dddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddd\"\n ),\n}\nCLAIMS = {\n \"iss\": \"auth_server\",\n \"iat\": datetime.now(UTC),\n \"exp\": datetime.now(UTC) + timedelta(minutes=15),\n}\n\n\ndef main():\n # Create OctKey from SECRET_KEY\n key = OctKey.import_key(SECRET_KEY)\n\n # Simulate creating a very large JWT\n # (this will fail with joserfc.errors.UnsupportedAlgorithmError\n # due to an invalid 'alg' header content\n try:\n token = jwt.encode(HEADER, CLAIMS, key)\n except UnsupportedAlgorithmError:\n # Use a forged token that has the same header and claims instead\n # but an invalid signature\n token = LONG_JWT_TOKEN\n logger.warning(f\"Created JWT: {token}\")\n\n # Now try to decode the large JWT\n try:\n decoded_token = jwt.decode(token, key)\n logger.warning(\"This line will never be reached.\")\n logger.warning(decoded_token.claims)\n except ExceededSizeError:\n logger.exception(\n \"The JWT size is too large and may be a security attack attempt.\"\n )\n # this is logging the whole header content in the exception message!\n\n```\n```\nCreated JWT: eyJ0eXAiOiJKV1QiLCJhbGciOiJSUzI1NmRkZGRkZGRkZGRkZGRkZGRkZGRkZGRkZGRkZGRkZGRkZGRkZGRkZGRkZGRkZGRkZGRkZGRkZGRkZGRkZGRkZGRSUzI1NmRkZGRkZGRkZGRkZGRkZGRkZGRkZGRkZGRkZGRkZGRkZGRkZGRkZGRkZGRkZGRkZGRkZGRkZGRkZGRkZGRkZGRSUzI1NmRkZGRkZGRkZGRkZGRkZGRkZGRkZGRkZGRkZGRkZGRkZGRkZGRkZGRkZGRkZGRkZGRkZGRkZGRkZGRkZGRkZGRSUzI1NmRkZGRkZGRkZGRkZGRkZGRkZGRkZGRkZGRkZGRkZGRkZGRkZGRkZGRkZGRkZGRkZGRkZGRkZGRkZGRkZGRkZGRSUzI1NmRkZGRkZGRkZGRkZGRkZGRkZGRkZGRkZGRkZGRkZGRkZGRkZGRkZGRkZGRkZGRkZGRkZGRkZGRkZGRkZGRkZGRSUzI1NmRkZGRkZGRkZGRkZGRkZGRkZGRkZGRkZGRkZGRkZGRkZGRkZGRkZGRkZGRkZGRkZGRkZGRkZGRkZGRkZGRkZGQifQ.eyJpc3MiOiJhdXRoX3NlcnZlciIsImlhdCI6MTc2MzI0OTEwMSwiZXhwIjoxNzY5MjQ5MTAxfQ.6-k2jmkGXD6wXOgYgjPS8E5lS_GjWpgIuY54gokjAn8\nThe JWT size is too large and may be a security attack attempt.\nTraceback (most recent call last):\n File \"security_issue.py\", line 55, in main\n claims = jwt.decode(token, key)\n ^^^^^^^^^^^^^^^^^^^^^^\n File \".venv/lib/python3.12/site-packages/joserfc/jwt.py\", line 106, in decode\n header, payload = _decode_jws(_value, key, algorithms, registry)\n ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\n File \".venv/lib/python3.12/site-packages/joserfc/jwt.py\", line 127, in _decode_jws\n jws_obj = deserialize_compact(value, key, algorithms, registry)\n ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\n File \".venv/lib/python3.12/site-packages/joserfc/jws.py\", line 183, in deserialize_compact\n obj = extract_compact(to_bytes(value), payload, registry)\n ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\n File \".venv/lib/python3.12/site-packages/joserfc/_rfc7797/compact.py\", line 50, in extract_rfc7515_compact\n registry.validate_header_size(header_segment)\n File \".venv/lib/python3.12/site-packages/joserfc/_rfc7515/registry.py\", line 104, in validate_header_size\n raise ExceededSizeError(f\"Header size of '{header!r}' exceeds {self.max_header_length} bytes.\")\njoserfc.errors.ExceededSizeError: exceeded_size: Header size of 'b'eyJ0eXAiOiJKV1QiLCJhbGciOiJSUzI1NmRkZGRkZGRkZGRkZGRkZGRkZGRkZGRkZGRkZGRkZGRkZGRkZGRkZGRkZGRkZGRkZGRkZGRkZGRkZGRkZGRkZGRSUzI1NmRkZGRkZGRkZGRkZGRkZGRkZGRkZGRkZGRkZGRkZGRkZGRkZGRkZGRkZGRkZGRkZGRkZGRkZGRkZGRkZGRkZGRSUzI1NmRkZGRkZGRkZGRkZGRkZGRkZGRkZGRkZGRkZGRkZGRkZGRkZGRkZGRkZGRkZGRkZGRkZGRkZGRkZGRkZGRkZGRSUzI1NmRkZGRkZGRkZGRkZGRkZGRkZGRkZGRkZGRkZGRkZGRkZGRkZGRkZGRkZGRkZGRkZGRkZGRkZGRkZGRkZGRkZGRSUzI1NmRkZGRkZGRkZGRkZGRkZGRkZGRkZGRkZGRkZGRkZGRkZGRkZGRkZGRkZGRkZGRkZGRkZGRkZGRkZGRkZGRkZGRSUzI1NmRkZGRkZGRkZGRkZGRkZGRkZGRkZGRkZGRkZGRkZGRkZGRkZGRkZGRkZGRkZGRkZGRkZGRkZGRkZGRkZGRkZGQifQ'' exceeds 512 bytes.\n\n```\n\n## Code location\nThis behavior occurs in:\n\n**`joserfc/_rfc7515/registry.py`**\n**L102-112**\n```python\n def validate_header_size(self, header: bytes) -> None:\n if header and len(header) > self.max_header_length:\n raise ExceededSizeError(f\"Header size of '{header!r}' exceeds {self.max_header_length} bytes.\")\n\n def validate_payload_size(self, payload: bytes) -> None:\n if payload and len(payload) > self.max_payload_length:\n raise ExceededSizeError(f\"Payload size of '{payload!r}' exceeds {self.max_payload_length} bytes.\")\n\n def validate_signature_size(self, signature: bytes) -> None:\n if len(signature) > self.max_signature_length:\n raise ExceededSizeError(f\"Signature of '{signature!r}' exceeds {self.max_signature_length} bytes.\")\n```\n**`joserfc/_rfc7516/registry.py`**\n**L103-123**\n```python\n def validate_protected_header_size(self, header: bytes) -> None:\n if header and len(header) > self.max_protected_header_length:\n raise ExceededSizeError(f\"Header size of '{header!r}' exceeds {self.max_protected_header_length} bytes.\")\n\n def validate_encrypted_key_size(self, ek: bytes) -> None:\n if ek and len(ek) > self.max_encrypted_key_length:\n raise ExceededSizeError(f\"Encrypted key size of '{ek!r}' exceeds {self.max_encrypted_key_length} bytes.\")\n\n def validate_initialization_vector_size(self, iv: bytes) -> None:\n if iv and len(iv) > self.max_initialization_vector_length:\n raise ExceededSizeError(\n f\"Initialization vector size of '{iv!r}' exceeds {self.max_initialization_vector_length} bytes.\"\n )\n\n def validate_ciphertext_size(self, ciphertext: bytes) -> None:\n if ciphertext and len(ciphertext) > self.max_ciphertext_length:\n raise ExceededSizeError(f\"Ciphertext size of '{ciphertext!r}' exceeds {self.max_ciphertext_length} bytes.\")\n\n def validate_auth_tag_size(self, tag: bytes) -> None:\n if tag and len(tag) > self.max_auth_tag_length:\n raise ExceededSizeError(f\"Auth tag size of '{tag!r}' exceeds {self.max_auth_tag_length} bytes.\")\n```\nAnother occurrence of `ExceededSizeError` in **`joserfc/_rfc7518/jwe_zips.py`** is not affected\nby this issue as it does not include the payload content in the exception message.\n\n### Impact\nIn scenarios where a web application does not reject excessively large HTTP header payloads, using `joserfc` can expose the system to an **Allocation of Resources Without Limits or Throttling** (CWE-770), potentially impacting disk, memory, and CPU on the application host, as well as any external log storage, ingestion pipelines or alerting services. This risk can be mitigated by removing the JWT payload from the logged content in some `joserfc.errors.ExceededSizeError()` exception message occurrences. It would also be beneficial for the documentation to advise deploying the library behind a robust web server or reverse proxy that correctly enforces maximum request header sizes.",
11+
"severity": [
12+
{
13+
"type": "CVSS_V4",
14+
"score": "CVSS:4.0/AV:N/AC:L/AT:N/PR:N/UI:N/VC:N/VI:N/VA:H/SC:N/SI:N/SA:H"
15+
}
16+
],
17+
"affected": [
18+
{
19+
"package": {
20+
"ecosystem": "PyPI",
21+
"name": "joserfc"
22+
},
23+
"ranges": [
24+
{
25+
"type": "ECOSYSTEM",
26+
"events": [
27+
{
28+
"introduced": "1.3.3"
29+
},
30+
{
31+
"fixed": "1.3.5"
32+
}
33+
]
34+
}
35+
]
36+
},
37+
{
38+
"package": {
39+
"ecosystem": "PyPI",
40+
"name": "joserfc"
41+
},
42+
"ranges": [
43+
{
44+
"type": "ECOSYSTEM",
45+
"events": [
46+
{
47+
"introduced": "1.4.0"
48+
},
49+
{
50+
"fixed": "1.4.2"
51+
}
52+
]
53+
}
54+
]
55+
}
56+
],
57+
"references": [
58+
{
59+
"type": "WEB",
60+
"url": "https://github.com/authlib/joserfc/security/advisories/GHSA-frfh-8v73-gjg4"
61+
},
62+
{
63+
"type": "WEB",
64+
"url": "https://github.com/authlib/joserfc/commit/63932f169d924caffafa761af2122b82059017f7"
65+
},
66+
{
67+
"type": "WEB",
68+
"url": "https://github.com/authlib/joserfc/commit/673c8743fd0605b0e1de6452be6cba75f44e466b"
69+
},
70+
{
71+
"type": "PACKAGE",
72+
"url": "https://github.com/authlib/joserfc"
73+
},
74+
{
75+
"type": "WEB",
76+
"url": "https://github.com/authlib/joserfc/releases/tag/1.3.5"
77+
},
78+
{
79+
"type": "WEB",
80+
"url": "https://github.com/authlib/joserfc/releases/tag/1.4.2"
81+
}
82+
],
83+
"database_specific": {
84+
"cwe_ids": [
85+
"CWE-770"
86+
],
87+
"severity": "CRITICAL",
88+
"github_reviewed": true,
89+
"github_reviewed_at": "2025-11-18T18:26:04Z",
90+
"nvd_published_at": null
91+
}
92+
}

0 commit comments

Comments
 (0)