Summary
A delimiter-handling flaw in the Hermes Agent webhook platform gateway can cause authorization checks to resolve a webhook request to a different route than the one that authenticated it. A remote attacker who possesses the target route's valid HMAC may gain access to toolsets associated with a higher-privileged route.
A delimiter-handling flaw in the Hermes Agent webhook platform gateway can cause authorization checks to resolve a webhook request to a different route than the one that authenticated it. A remote attacker who possesses the target route's valid HMAC may gain access to toolsets associated with a higher-privileged route.
Affected context
The issue occurs in Hermes Agent webhook gateway deployments that construct session identifiers from route names and delivery identifiers, then later recover the authorizing route by splitting the identifier. It becomes risky when route names can contain the same delimiter used in the session format and routes have different toolset privileges.
The issue occurs in Hermes Agent webhook gateway deployments that construct session identifiers from route names and delivery identifiers, then later recover the authorizing route by splitting the identifier. It becomes risky when route names can contain the same delimiter used in the session format and routes have different toolset privileges.
Exploit preconditions
- Attack surface: The webhook platform gateway's request authentication and route-authorization flow
- Required access: A valid HMAC for the targeted webhook route, or equivalent ability to produce an authenticated request
- Trigger point: Processing a webhook request whose route name contains a colon
- Why exploitation is possible: The gateway re-parses a delimiter-based session identifier and may resolve authorization to a different, higher-privileged route prefix
- Attack surface: The webhook platform gateway's request authentication and route-authorization flow
- Required access: A valid HMAC for the targeted webhook route, or equivalent ability to produce an authenticated request
- Trigger point: Processing a webhook request whose route name contains a colon
- Why exploitation is possible: The gateway re-parses a delimiter-based session identifier and may resolve authorization to a different, higher-privileged route prefix
Why this happens
The vulnerability results from ambiguous serialization of security-relevant identity data. The gateway combines multiple fields into a colon-delimited chat_id, then derives the authorizing route by splitting that value, allowing route names containing the delimiter to alter the authorization context. This is an authorization enforcement failure mapped to CWE-863: Incorrect Authorization, because the system may grant permissions based on an identity different from the one that was authenticated.
The vulnerability results from ambiguous serialization of security-relevant identity data. The gateway combines multiple fields into a colon-delimited chat_id, then derives the authorizing route by splitting that value, allowing route names containing the delimiter to alter the authorization context. This is an authorization enforcement failure mapped to CWE-863: Incorrect Authorization, because the system may grant permissions based on an identity different from the one that was authenticated.
Potential impact
- An attacker may access toolsets not assigned to the authenticated route
- A remote attacker could perform higher-privileged agent actions
- Sensitive data may be exposed through unauthorized tools
- Connected systems or workflows could be modified or disrupted
- The issue could enable privilege escalation across webhook routes
- An attacker may access toolsets not assigned to the authenticated route
- A remote attacker could perform higher-privileged agent actions
- Sensitive data may be exposed through unauthorized tools
- Connected systems or workflows could be modified or disrupted
- The issue could enable privilege escalation across webhook routes
General mitigation guidance
Mitigation generally focuses on preserving an unambiguous, authenticated binding between a request and its authorized route.
Common defensive patterns include:
- Avoiding delimiter-based parsing for security-sensitive identifiers
- Storing route identity as a separate, structured field rather than reconstructing it from a session key
- Canonicalizing and validating route names before authentication and authorization decisions
- Performing authorization against the originally authenticated route context
- Applying least privilege to route toolsets and connected integrations
- Rejecting ambiguous identifiers and reserving structural delimiters in route names where appropriate
- Keeping high-privilege tools isolated behind independent authorization controls
Mitigation generally focuses on preserving an unambiguous, authenticated binding between a request and its authorized route.
Common defensive patterns include:
- Avoiding delimiter-based parsing for security-sensitive identifiers
- Storing route identity as a separate, structured field rather than reconstructing it from a session key
- Canonicalizing and validating route names before authentication and authorization decisions
- Performing authorization against the originally authenticated route context
- Applying least privilege to route toolsets and connected integrations
- Rejecting ambiguous identifiers and reserving structural delimiters in route names where appropriate
- Keeping high-privilege tools isolated behind independent authorization controls
How teams detect issues like this
Detection can include static analysis and review of code that concatenates security-sensitive fields into delimited strings and later recovers them with split or substring operations. Code review should examine whether authenticated identities are reconstructed after verification, whether route names are constrained consistently, and whether authorization uses canonical identity data. Policy checks can require structured identifiers, explicit route-to-toolset mappings, and tests covering delimiter-containing names and similarly ambiguous inputs. Automated security review tools may help identify these patterns in gateway and webhook code.
Detection can include static analysis and review of code that concatenates security-sensitive fields into delimited strings and later recovers them with split or substring operations. Code review should examine whether authenticated identities are reconstructed after verification, whether route names are constrained consistently, and whether authorization uses canonical identity data. Policy checks can require structured identifiers, explicit route-to-toolset mappings, and tests covering delimiter-containing names and similarly ambiguous inputs. Automated security review tools may help identify these patterns in gateway and webhook code.

