mirror of
https://github.com/Glitchy-Sheep/boosty-downloader.git
synced 2026-10-14 21:33:23 +00:00
[PR #108] [MERGED] Update dependency pydantic-settings to v2.14.2 [SECURITY] #113
Labels
No labels
api-drift
bug
ci
documentation
enhancement
enhancement
pull-request
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
Glitchy-Sheep/boosty-downloader#113
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
📋 Pull Request Information
Original PR: https://github.com/Glitchy-Sheep/boosty-downloader/pull/108
Author: @renovate[bot]
Created: 6/24/2026
Status: ✅ Merged
Merged: 8/7/2026
Merged by: @Glitchy-Sheep
Base:
main← Head:renovate/pypi-pydantic-settings-vulnerability📝 Commits (1)
cb87595Update dependency pydantic-settings to v2.14.2 [SECURITY]📊 Changes
1 file changed (+4 additions, -4 deletions)
View changed files
📝
poetry.lock(+4 -4)📄 Description
This PR contains the following updates:
2.12.0→2.14.2pydantic-settings: NestedSecretsSettingsSource follows symlinks outside secrets_dir, enabling local file read and bypassing secrets_dir_max_size
GHSA-4xgf-cpjx-pc3j
More information
Details
Summary
NestedSecretsSettingsSourcereads secret values from files in a configuredsecrets_dir. Whensecrets_nested_subdir=True, a directory entry insidesecrets_dirthat is a symbolic link pointing outsidesecrets_diris followed, so files outside the configured directory are read into settings values. The same code path bypasses the documentedsecrets_dir_max_sizeprotection. An attacker or lower-privileged component able to influence entries in the configured secrets directory (for example, a writable or shared secrets mount) can turn this into an unintended local file read into settings and can defeat the advertised loading-size cap. This report does not claim network reachability by itself.Details
NestedSecretsSettingsSourceperformed two passes oversecrets_dirusing two different, inconsistent directory-traversal implementations:validate_secrets_path()usedPath.glob('**/*'), which does not descend into a symbolically-linked directory.load_secrets()usedglob.iglob(f'{path}/**/*', recursive=True)followed byread_text(), which does follow symlinked directories and reads through the link target.Because the two passes disagreed on symlinks, a symlinked directory inside
secrets_dirwhose target lives elsewhere was invisible to the size accounting (counted as 0 bytes) while still being fully read by the loader. This produces two distinct problems:secrets_dirthat resolves outside it is followed, and the external file's contents are loaded into the corresponding settings field.secrets_dir_max_sizebypass (CWE-400). The size check never sees the out-of-tree content, so the documented size cap is neither respected nor able to reject the oversized external file. A related amplification exists for cyclic in-tree symlinks, whichglob.iglob(recursive=True)re-traverses, inflating the size accounting and the number of loaded secrets.Reproduction
In a clean Linux container, with a
secrets_dircontaining a symlinksecrets/db -> /path/outsideand anoutside/passwdfile of 512 bytes, whilesecrets_dir_max_size=100:On affected versions,
Settings().db.passwdis populated with the 512-byte out-of-tree file and noSettingsErroris raised, even though the file exceedssecrets_dir_max_size.Impact
Applications that opt into
NestedSecretsSettingsSourcewithsecrets_nested_subdir=Trueand load secrets from a directory whose entries can be influenced by an attacker or a lower-privileged component (for example, a writable or shared secrets mount, or a secrets directory partially populated from untrusted input) are affected. The impact is:secrets_dircan be read into settings values (local file read).secrets_dir_max_sizecap can be bypassed, and cyclic symlinks can inflate resource usage during loading.The vulnerability requires the ability to place a symbolic link inside the configured secrets directory; it is not remotely reachable on its own. Applications that do not use
NestedSecretsSettingsSource, or that pointsecrets_dirat a directory fully under the application's control, are not affected.Mitigation
Upgrade to pydantic-settings 2.14.2, which:
secrets_dir, so symlinked directories pointing outside are never followed;secrets_dir, as defense in depth.If upgrading is not immediately possible, ensure the configured
secrets_diris fully owned and controlled by the application (no writable or attacker-influenced entries), or avoidsecrets_nested_subdir=True.Severity
CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:L/I:L/A:LReferences
This data is provided by the GitHub Advisory Database (CC-BY 4.0).
Release Notes
pydantic/pydantic-settings (pydantic-settings)
v2.14.2Compare Source
v2.14.1Compare Source
What's Changed
clsconflicting with classmethod parameter by @hramezani in #858Full Changelog: https://github.com/pydantic/pydantic-settings/compare/v2.14.0...v2.14.1
v2.14.0Compare Source
What's Changed
Literal[numeric Enum]coercion for CLI and env vars by @m9810223 in #811boto3-stubstotypes-boto3by @hramezani in #831BaseSettings.__init__()by @Viicos in #842cli_ignore_unknown_args=Truenot working on subcommands by @hramezani in #844python -OOby falling back tojson_schema_extraby @hramezani in #843New Contributors
Full Changelog: https://github.com/pydantic/pydantic-settings/compare/v2.13.1...v2.14.0
v2.13.1Compare Source
v2.13.0Compare Source
What's Changed
Nonefor inaccessible GCP Secret Manager secrets by @zaphod72 in #712NoDecodeby @tselepakis in #695NAMEenvironment variable in WSL by @kzrnm in #747(default: …)in the help message forCliToggleFlagby @kzrnm in #740snake_case_conversionwithenv_prefixfor Azure Key Vault source by @cstarkers in #762New Contributors
Full Changelog: https://github.com/pydantic/pydantic-settings/compare/v2.12.0...v2.13.0
Configuration
📅 Schedule: (UTC)
🚦 Automerge: Disabled by config. Please merge this manually once you are satisfied.
♻ Rebasing: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox.
🔕 Ignore: Close this PR and you won't be reminded about this update again.
This PR was generated by Mend Renovate. View the repository job log.
🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.