QWED

Type to search pages, engines and advisories.

    Looking for API details?Search the docs

    Security·Advisories·GHSA-wjjh-v7vm-hmwr

    ToolGuard skips a tool call that sits beside another recognised call, including Responses API output[] items; ArgumentGuard never checks output[] (incomplete fix of GHSA-xhq6-w3f2-m5w6)

    high · 8.1Fixed in 0.6.2GHSA-wjjh-v7vm-hmwr · Published 13 November 2026

    Impact

    This is an incomplete fix of GHSA-xhq6-w3f2-m5w6.

    The 0.6.1 fix made ToolGuard fail closed when the output[] of a Responses API object ("object": "response") holds an executable item. That check, like the rest of ToolGuard's scan for tool calls in an unrecognised format, only runs when no other tool-call shape is found in the response. If the same object also carries a tool call that ToolGuard does recognise, ToolGuard verifies only that call and nothing else in the object is checked.

    Reproduced on 0.6.1 for both the pip and npm packages, with an executable item in output[] such as a local_shell_call running rm -rf / or a function_call to bash:

    Also present at the top level of the response object 0.6.1 result
    nothing blocked
    tool_calls: [{"name": "search", "arguments": {}}] verified
    choices: [{"message": {"tool_calls": [ ...search... ]}}] verified
    content: [{"type": "tool_use", "name": "search", "input": {}}] verified
    type: "tool_call" or type: "function_call" with the name search verified
    toolCalls: [{"name": "search", "arguments": {}}] (npm package only) verified
    tool_calls: [] (empty) blocked

    The same happens when the executable item sits elsewhere beside a recognised call. Also reproduced on 0.6.1 for both packages, with tool_calls: [{"type": "function", "function": {"name": "search", "arguments": "{}"}}] beside it (each of these is blocked when it is the only call in the response):

    Where the executable item sits 0.6.1 result
    output[] of an object with no object field, or with "object": "realtime.response" verified
    item of a stream event such as response.output_item.done verified
    output[] of a response wrapper, as in a response.completed event verified
    a legacy function_call in the same choices[].message verified
    a function_call block in a content list whose other call is a tool_use block (no tool_calls) verified
    root tool_name and arguments fields verified

    When this happens, none of ToolGuard's checks apply to the hidden call: the default blocklist, allowed_tools, dangerous-argument patterns, and in Python also custom validators and max_calls_per_response.

    ArgumentGuard (Python package) has a gap with the same root cause. It never reads call items from a response object's output[]: it treats the output list itself as one argument set, skips it because it is not an object, and passes without applying rules or tool_rules. For example, a response object whose output[] holds a function_call to transfer with {"amount": 1000000} verifies against ArgumentGuard(tool_rules={"transfer": {"amount": {"type": "number", "max": 100}}}). This needs no change to the top level of the response.

    Who is affected:

    • Applications that verify responses with ToolGuard, ResponseVerifier or VerifiedOpenAI.responses.create(), where an attacker can shape the response envelope and not only the model's output items. The official OpenAI Python SDK's Response model has no tool_calls, choices, content or type field, so a Responses API object that comes straight from OpenAI through the SDK cannot carry the extra call. The chat message and content rows above need a message or content list that mixes two call formats. Exposure comes from verifying objects built or relayed by something less trusted: a third-party or self-hosted Open Responses-compatible server, a proxy or gateway, an agent-to-agent hand-off, or application code that merges fields from several sources.
    • Applications that rely on ArgumentGuard without ToolGuard to bound tool arguments in Responses API objects. A prompt-injected or misbehaving model only has to return out-of-range arguments.

    Applications that verify individual Responses items, stream items or tool calls on their own are not affected.

    Root cause

    The 0.6.1 fix added a fail-closed check for output[] but no extraction of the calls in it, and put that check in ToolGuard's scan for unrecognised tool content. That scan only ran after every recognised envelope shape had come back empty, so any recognised call in the same object took precedence and the rest of the object went unchecked: output[] items, stream items, wrappers and other call fields alike. ArgumentGuard did not consult output[] at all. Both are gaps in the GHSA-xhq6-w3f2-m5w6 fix, which states that its rules apply to output[] members of a response object and in ArgumentGuard.

    Patches

    Fixed in 0.6.2 (pip and npm). The fix:

    • extracts call items from the output[] of a response object (function_call, local_shell_call, shell_call, apply_patch_call, computer_call, custom_tool_call, mcp_approval_request) and checks each one as it would a standalone call: blocklist, allowlist and argument patterns, plus custom validators and max_calls_per_response in Python;
    • after taking the calls from one envelope, scans everything it did not read for another call, whatever the object's object or type says, and blocks the response if it finds one. This covers output[] lists on any object, stream items, response wrappers, legacy message.function_call, function_call content blocks and root call fields. Any other *_call / *_request item in an output[] list, stream item or response wrapper blocks the response too;
    • rejects, as an ambiguous envelope, a response object whose output[] holds a call item and that also has a direct call type or carries any other call envelope or collection at the top level (tool_call, toolCall, function_call, functionCall, function, tool_use, tool_calls, toolCalls, choices, content), and an output[] call item that carries one of these keys;
    • fails closed when a response object's output is not a list of objects (the Python package skipped tuples and SDK models left in output);
    • applies ArgumentGuard rules and tool_rules to each call in output[], and reads call items in an output[] list, stream item or response wrapper whatever object says (Python).

    The same release also rejects calls whose name, tool_name and toolName fields name different tools (issue #64), in both packages and on every path, so the output[] fix cannot be sidestepped by giving one call two identities. It also makes argument normalisation linear-time: a regex that folds spaced spellings such as os . system backtracked quadratically, so a tool argument of about 100,000 spaces took seconds to check (see the CHANGELOG).

    As a side effect, VerifiedOpenAI(...).responses.create() no longer raises ResponseBlocked for safe tool calls. In 0.6.1, ToolGuard failed closed on every response object with a tool call in output[].

    Workarounds

    Until you can upgrade:

    • Make sure each response presents its calls in one place before verifying it: reject any object that carries more than one of output, item, response, tool_calls, toolCalls, choices, content or a call type, a chat message that has both tool_calls and function_call, and content lists holding function_call blocks. Or rebuild the object from only the fields you need.
    • Or verify each output[] item, stream item or tool call on its own: in 0.6.1, ToolGuard and ArgumentGuard check a standalone function_call or client action item correctly.
    • In the code that dispatches model output, only execute items that were verified individually.

    References

    • Incomplete fix of GHSA-xhq6-w3f2-m5w6 (fixed in 0.6.1).
    • Reproduced on v0.6.1 (45d3e20) for both the pip and npm packages.
    All advisories

    Affected and fixed

    qwed-open-responses

    Affected<= 0.6.1 Fixed in0.6.2

    qwed-open-responses

    Affected<= 0.6.1 Fixed in0.6.2
    Weakness
    CWE-636 Not Failing SecurelyCWE-693 Protection Mechanism Failure
    View on GitHub