Repository navigation
chore(deps): update dependency marshmallow to v3.26.2 [security] - #83
Open
renovate[bot] wants to merge 1 commit into
Open
renovate[bot] wants to merge 1 commit into
renovate[bot] wants to merge 1 commit into
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This PR contains the following updates:
==3.20.1→==3.26.2Marshmallow has DoS in Schema.load(many)
CVE-2025-68480 / GHSA-428g-f7cq-pgp5
More information
Details
Impact
Schema.load(data, many=True)is vulnerable to denial of service attacks. A moderately sized request can consume a disproportionate amount of CPU time.Patches
4.1.2, 3.26.2
Workarounds
Severity
CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:LReferences
This data is provided by the GitHub Advisory Database (CC-BY 4.0).
Release Notes
marshmallow-code/marshmallow (marshmallow)
v3.26.2Compare Source
Bug fixes:
2025-68480: Merge error store messages without rebuilding collections.Thanks 카푸치노 for reporting and :user:
deckar01for the fix.v3.26.1Compare Source
Bug fixes:
class Meta <marshmallow.Schema.Meta>options (:issue:2804).Thanks :user:
lawrence-lawfor reporting.Other changes:
dataparam ofNested._deserialize <marshmallow.fields.Nested._deserialize>(:issue:2802).Thanks :user:
gbensonfor reporting.v3.26.0Compare Source
See :ref:
upgrading_4_0for a guide on updating your code.Features:
Field <marshmallow.fields.Field>constructor kwargs (:issue:2285).Thanks :user:
navignawfor the suggestion.DateTime <marshmallow.fields.DateTime>,Date <marshmallow.fields.Date>,Time <marshmallow.fields.Time>,TimeDelta <marshmallow.fields.TimeDelta>, andEnum <marshmallow.fields.Enum>accept their internal value types as valid input (:issue:
1415).Thanks :user:
bitdancerfor the suggestion.@validates <marshmallow.validates>accepts multiple field names (:issue:1960).Backwards-incompatible: Decorated methods now receive
data_keyas a keyword argument.Thanks :user:
dpriskornfor the suggestion and :user:dharani7998for the PR.Other changes:
Typing:
Field <marshmallow.fields.Field>is now a generic type with a type argument for the internal value type.marshmallow.fields.UUIDno longer subclassesmarshmallow.fields.String.marshmallow.Schema.loadno longer silently fails to call schema validators when a generator is passed (:issue:1898).The typing of
datais also updated to be more accurate.Thanks :user:
ziplokk1for reporting.Backwards-incompatible: Use
datetime.date.fromisoformat,datetime.time.fromisoformat, anddatetime.datetime.fromisoformatfrom the standard library to deserialize dates, times and datetimes (:pr:2078).As a consequence of this change:
from_iso_date,from_iso_timeandfrom_iso_datetimeare removed frommarshmallow.utils.Remove
isoformat,to_iso_timeandto_iso_datetimefrommarshmallow.utils(:pr:2766).Remove
from_rfc, andrfcformatfrommarshmallow.utils(:pr:2767).Remove
is_keyed_tuplefrommarshmallow.utils(:pr:2768).Remove
get_fixed_timezonefrommarshmallow.utils(:pr:2773).Backwards-incompatible:
marshmallow.fields.Booleanno longer serializes non-boolean values (:pr:2725).Backwards-incompatible: Rename
schemaparameter toparentinmarshmallow.fields.Field._bind_to_schema(:issue:1360).Backwards-incompatible: Rename
pass_manyparameter topass_collectionin pre/post processing methods (:issue:1369).Backwards-incompatible:
marshmallow.fields.TimeDeltano longer truncates float values whendeserializing (:pr:
2654). This allows microseconds to be preserved, e.g... code-block:: python
Before
datetime.timedelta(seconds=12)
After
datetime.timedelta(seconds=12, microseconds=900000)
marshmallow.fields.TimeDeltaserialization (:pr:2654).serialization_typeparameter frommarshmallow.fields.TimeDelta(:pr:2654).Thanks :user:
ddelangefor the PR.Schema <marshmallow.schema.Schema>'scontextattribute (deprecated since 3.24.0). Passing a contextshould be done using
contextvars.ContextVar(:issue:1826).marshmallow 4 provides an experimental
Context <marshmallow.experimental.context.Context>manager class that can be used to both set and retrieve context.
.. code-block:: python
{'name_suffixed': 'foobar'}
marshmallow.pre_load,marshmallow.post_load,marshmallow.validates_schema,receive
unknownas a keyword argument (:pr:1632).Thanks :user:
jforandfor the PR.decorators <marshmallow.decorators>are keyword-only arguments.json_dataparameter ofmarshmallow.Schema.loadstosfor compatibility with most render module implementations (
json,simplejson, etc.) (:pr:2764).Also make it a positional-only argument.
errors at class declaration time (previously happended when the schema was instantiated) (:pr:
2772).unknownwill cause an error in type checkers (:pr:2771).Deprecations/Removals:
fieldsoradditionalclass Meta options with undeclared fields (:issue:1356).orderedclass Meta option is removed (:issue:2146). Field order is already preserved by default.Set
Schema.dict_classtoOrderedDictto maintain the previous behavior.marshmallow.basemodule is removed (:pr:2722).Previously-deprecated APIs have been removed, including:
orderedclass Meta <marshmallow.Schema.Meta>option is removed (:issue:2146) (deprecated in 3.26.0).marshmallow.fields.Numberis no longer usable as a field in a schema (deprecated in 3.24.0).Use
marshmallow.fields.Integer,marshmallow.fields.Float, ormarshmallow.fields.Decimalinstead.marshmallow.fields.Mappingis no longer usable as a field in a schema (deprecated in 3.24.0).ValidationError <marshmallow.exceptions.ValidationError>for invalid values (deprecated in 3.24.0).Returning
Falseis no longer supported (:issue:1775).Use
marshmallow.fields.Dictinstead.__version__,__parsed_version__, and__version_info__attributes (deprecated in 3.21.0).defaultandmissingparameters, which were replaced bydump_defaultandload_defaultin 3.13.0 (:pr:1742, :pr:2700).metadata=...argument instead (:issue:
1350).marshmallow.utils.pprint(deprecated in 3.7.0). Usepprint.pprintinstead."self"tofields.Nested(deprecated in 3.3.0). Use a callable instead.Field.fail, which was replaced byField.make_errorin 3.0.0.json_moduleclass Meta option (deprecated in 3.0.0b3). Userender_moduleinstead.v3.25.1Compare Source
Bug fixes:
Tuple <marshmallow.fields.Tuple>,Boolean <marshmallow.fields.Boolean>, andPluck <marshmallow.fields.Pluck>constructors (:pr:
2756).marshmallow.class_registry.get_class(:pr:2756).Documentation:
2746, :pr:2747, :pr:2748, :pr:2749, :pr:2750, :pr:2751).v3.25.0Compare Source
Features:
SchemaMeta.get_declared_fields(:pr:2742).Bug fixes:
Schema.optsto allow subclasses to define their ownoptions classes (:pr:
2744).Other changes:
marshmallow.base.SchemaABCfor backwards-compatibility (:issue:2743).Note that this class is deprecated and will be removed in marshmallow 4.
Use
marshmallow.schema.Schemaas a base class for type-checking instead.v3.24.2Compare Source
Changes:
__new__to avoid breaking usages ofinspect.signaturewithField <marshmallow.fields.Field>classes.This allows marshmallow-sqlalchemy users to upgrade marshmallow without
upgrading to marshmallow-sqlalchemy>=1.1.1.
Documentation:
2739).Thanks :user:
llucaxfor reporting.v3.24.1Compare Source
Bug fixes:
class_registry.get_class <marshmallow.class_registry.get_class>(:pr:2735).v3.24.0Compare Source
See :ref:
upgrading_4_0for a guide on updating your code.Features:
Field <marshmallow.fields.Field>constructor kwargs (:issue:2285).Thanks :user:
navignawfor the suggestion.DateTime <marshmallow.fields.DateTime>,Date <marshmallow.fields.Date>,Time <marshmallow.fields.Time>,TimeDelta <marshmallow.fields.TimeDelta>, andEnum <marshmallow.fields.Enum>accept their internal value types as valid input (:issue:
1415).Thanks :user:
bitdancerfor the suggestion.@validates <marshmallow.validates>accepts multiple field names (:issue:1960).Backwards-incompatible: Decorated methods now receive
data_keyas a keyword argument.Thanks :user:
dpriskornfor the suggestion and :user:dharani7998for the PR.Other changes:
Typing:
Field <marshmallow.fields.Field>is now a generic type with a type argument for the internal value type.marshmallow.fields.UUIDno longer subclassesmarshmallow.fields.String.marshmallow.Schema.loadno longer silently fails to call schema validators when a generator is passed (:issue:1898).The typing of
datais also updated to be more accurate.Thanks :user:
ziplokk1for reporting.Backwards-incompatible: Use
datetime.date.fromisoformat,datetime.time.fromisoformat, anddatetime.datetime.fromisoformatfrom the standard library to deserialize dates, times and datetimes (:pr:2078).As a consequence of this change:
from_iso_date,from_iso_timeandfrom_iso_datetimeare removed frommarshmallow.utils.Remove
isoformat,to_iso_timeandto_iso_datetimefrommarshmallow.utils(:pr:2766).Remove
from_rfc, andrfcformatfrommarshmallow.utils(:pr:2767).Remove
is_keyed_tuplefrommarshmallow.utils(:pr:2768).Remove
get_fixed_timezonefrommarshmallow.utils(:pr:2773).Backwards-incompatible:
marshmallow.fields.Booleanno longer serializes non-boolean values (:pr:2725).Backwards-incompatible: Rename
schemaparameter toparentinmarshmallow.fields.Field._bind_to_schema(:issue:1360).Backwards-incompatible: Rename
pass_manyparameter topass_collectionin pre/post processing methods (:issue:1369).Backwards-incompatible:
marshmallow.fields.TimeDeltano longer truncates float values whendeserializing (:pr:
2654). This allows microseconds to be preserved, e.g... code-block:: python
Before
datetime.timedelta(seconds=12)
After
datetime.timedelta(seconds=12, microseconds=900000)
marshmallow.fields.TimeDeltaserialization (:pr:2654).serialization_typeparameter frommarshmallow.fields.TimeDelta(:pr:2654).Thanks :user:
ddelangefor the PR.Schema <marshmallow.schema.Schema>'scontextattribute (deprecated since 3.24.0). Passing a contextshould be done using
contextvars.ContextVar(:issue:1826).marshmallow 4 provides an experimental
Context <marshmallow.experimental.context.Context>manager class that can be used to both set and retrieve context.
.. code-block:: python
{'name_suffixed': 'foobar'}
marshmallow.pre_load,marshmallow.post_load,marshmallow.validates_schema,receive
unknownas a keyword argument (:pr:1632).Thanks :user:
jforandfor the PR.decorators <marshmallow.decorators>are keyword-only arguments.json_dataparameter ofmarshmallow.Schema.loadstosfor compatibility with most render module implementations (
json,simplejson, etc.) (:pr:2764).Also make it a positional-only argument.
errors at class declaration time (previously happended when the schema was instantiated) (:pr:
2772).unknownwill cause an error in type checkers (:pr:2771).Deprecations/Removals:
fieldsoradditionalclass Meta options with undeclared fields (:issue:1356).orderedclass Meta option is removed (:issue:2146). Field order is already preserved by default.Set
Schema.dict_classtoOrderedDictto maintain the previous behavior.marshmallow.basemodule is removed (:pr:2722).Previously-deprecated APIs have been removed, including:
orderedclass Meta <marshmallow.Schema.Meta>option is removed (:issue:2146) (deprecated in 3.26.0).marshmallow.fields.Numberis no longer usable as a field in a schema (deprecated in 3.24.0).Use
marshmallow.fields.Integer,marshmallow.fields.Float, ormarshmallow.fields.Decimalinstead.marshmallow.fields.Mappingis no longer usable as a field in a schema (deprecated in 3.24.0).ValidationError <marshmallow.exceptions.ValidationError>for invalid values (deprecated in 3.24.0).Returning
Falseis no longer supported (:issue:1775).Use
marshmallow.fields.Dictinstead.__version__,__parsed_version__, and__version_info__attributes (deprecated in 3.21.0).defaultandmissingparameters, which were replaced bydump_defaultandload_defaultin 3.13.0 (:pr:1742, :pr:2700).metadata=...argument instead (:issue:
1350).marshmallow.utils.pprint(deprecated in 3.7.0). Usepprint.pprintinstead."self"tofields.Nested(deprecated in 3.3.0). Use a callable instead.Field.fail, which was replaced byField.make_errorin 3.0.0.json_moduleclass Meta option (deprecated in 3.0.0b3). Userender_moduleinstead.v3.23.3Compare Source
Bug fixes:
Schema.from_dict <marshmallow.schema.Schema.from_dict>(:issue:1653).Thanks :user:
SteadBytesfor reporting.Support:
marshmallow.fieldsAPI reference (:issue:2307).Thanks :user:
AbdealiLoKofor reporting.v3.23.2Compare Source
Bug fixes:
Field,Nested, andFunctionfieldsto resolve PyCharm warnings (:issue:
2268).Thanks :user:
Fares-Abubakerfor reporting and fixing.v3.23.1Compare Source
Support:
absoluteparameter ofURLfield (:pr:2327).documentation and README (:pr:
2323).v3.23.0Compare Source
Features:
SchemaandField.Other changes:
2319).2318).v3.22.0Compare Source
Features:
manyMeta option toSchemaso it expects a collection by default (:issue:2270).Thanks :user:
himalczykfor reporting and :user:deckar01for the PR.2279).Thanks :user:
deckar01for the PR.v3.21.3Compare Source
Bug fixes:
2277).Thanks :user:
mrcljxfor the PR.v3.21.2Compare Source
Bug fixes:
fields.DateTime(:issue:2133).Thanks :user:
flydzenfor reporting.v3.21.1Compare Source
Bug fixes:
2245).Thanks :user:
travnickfor reporting.v3.21.0Compare Source
Bug fixes:
URLfields to allow missing user field,per NWG RFC 3986 (:issue:
2232). Thanks :user:ddennerline3for reportingand :user:
deckar01for the PR.Other changes:
__version__,__parsed_version__, and__version_info__attributes are deprecated (:issue:
2227). Use feature detection orimportlib.metadata.version("marshmallow")instead.v3.20.2Compare Source
Bug fixes:
Nestedfield type hint for lambdaSchematypes (:pr:2164).Thanks :user:
somethingnew2-0for the PR.Other changes:
2188).Thanks :user:
hugovkfor the PR.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.