Skip to content

[v3-2-test] Tighten deserialization allowlist regex to require full-string match (#66499)#67096

Merged
vatsrahul1001 merged 1 commit into
v3-2-testfrom
backport-80f1ab4-v3-2-test
May 18, 2026
Merged

[v3-2-test] Tighten deserialization allowlist regex to require full-string match (#66499)#67096
vatsrahul1001 merged 1 commit into
v3-2-testfrom
backport-80f1ab4-v3-2-test

Conversation

@github-actions
Copy link
Copy Markdown
Contributor

  • Tighten deserialization allowlist regex to use full-string match

The allowed_deserialization_classes_regexp allowlist used re.match(),
which only anchors at the start of the string. A pattern like
airflow\.models\.Variable therefore also admitted classnames such as
airflow.models.Variable_Malicious. Switch to re.fullmatch() so the
admin's pattern matches the entire classname; document the semantics in
the config description so operators know to use .* for prefix-style
allowances.


(cherry picked from commit 80f1ab4)

Co-authored-by: Jarek Potiuk jarek@potiuk.com
Co-authored-by: Rahul Vats 43964496+vatsrahul1001@users.noreply.github.com

…tring match (#66499)

* Tighten deserialization allowlist regex to use full-string match

The ``allowed_deserialization_classes_regexp`` allowlist used ``re.match()``,
which only anchors at the start of the string. A pattern like
``airflow\.models\.Variable`` therefore also admitted classnames such as
``airflow.models.Variable_Malicious``. Switch to ``re.fullmatch()`` so the
admin's pattern matches the entire classname; document the semantics in
the config description so operators know to use ``.*`` for prefix-style
allowances.

* Add newsfragment for #66499

---------
(cherry picked from commit 80f1ab4)

Co-authored-by: Jarek Potiuk <jarek@potiuk.com>
Co-authored-by: Rahul Vats <43964496+vatsrahul1001@users.noreply.github.com>
@vatsrahul1001 vatsrahul1001 added the type:misc/internal Changelog: Misc changes that should appear in change log label May 18, 2026
@vatsrahul1001 vatsrahul1001 merged commit 5e2fcf3 into v3-2-test May 18, 2026
84 checks passed
@vatsrahul1001 vatsrahul1001 deleted the backport-80f1ab4-v3-2-test branch May 18, 2026 11:57
vatsrahul1001 added a commit that referenced this pull request May 20, 2026
…tring match (#66499) (#67096)

* Tighten deserialization allowlist regex to use full-string match

The ``allowed_deserialization_classes_regexp`` allowlist used ``re.match()``,
which only anchors at the start of the string. A pattern like
``airflow\.models\.Variable`` therefore also admitted classnames such as
``airflow.models.Variable_Malicious``. Switch to ``re.fullmatch()`` so the
admin's pattern matches the entire classname; document the semantics in
the config description so operators know to use ``.*`` for prefix-style
allowances.

* Add newsfragment for #66499

---------
(cherry picked from commit 80f1ab4)

Co-authored-by: Jarek Potiuk <jarek@potiuk.com>
Co-authored-by: Rahul Vats <43964496+vatsrahul1001@users.noreply.github.com>
vatsrahul1001 added a commit that referenced this pull request May 20, 2026
…tring match (#66499) (#67096)

* Tighten deserialization allowlist regex to use full-string match

The ``allowed_deserialization_classes_regexp`` allowlist used ``re.match()``,
which only anchors at the start of the string. A pattern like
``airflow\.models\.Variable`` therefore also admitted classnames such as
``airflow.models.Variable_Malicious``. Switch to ``re.fullmatch()`` so the
admin's pattern matches the entire classname; document the semantics in
the config description so operators know to use ``.*`` for prefix-style
allowances.

* Add newsfragment for #66499

---------
(cherry picked from commit 80f1ab4)

Co-authored-by: Jarek Potiuk <jarek@potiuk.com>
Co-authored-by: Rahul Vats <43964496+vatsrahul1001@users.noreply.github.com>
vatsrahul1001 added a commit that referenced this pull request May 21, 2026
…tring match (#66499) (#67096)

* Tighten deserialization allowlist regex to use full-string match

The ``allowed_deserialization_classes_regexp`` allowlist used ``re.match()``,
which only anchors at the start of the string. A pattern like
``airflow\.models\.Variable`` therefore also admitted classnames such as
``airflow.models.Variable_Malicious``. Switch to ``re.fullmatch()`` so the
admin's pattern matches the entire classname; document the semantics in
the config description so operators know to use ``.*`` for prefix-style
allowances.

* Add newsfragment for #66499

---------
(cherry picked from commit 80f1ab4)

Co-authored-by: Jarek Potiuk <jarek@potiuk.com>
Co-authored-by: Rahul Vats <43964496+vatsrahul1001@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area:ConfigTemplates area:task-sdk type:misc/internal Changelog: Misc changes that should appear in change log

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants