GHSA-465g-fh3v-9jw4: Go/github.com/rabbitmq/amqp091-go vulnerability

Published Sep 17, 2026
·
Updated

Summary A query parameter injection vulnerability exists in the AMQP client's connection URI formatting logic. When generating or parsing connection URIs, TLS-related filesystem paths (such as certificates or keys) are appended directly to the URI's query string using string concatenation rather than secure URL encoding via functions like url.QueryEscape.

If an application handles a TLS file path containing special character delimiters (such as & or =), these characters are interpreted as parameter separators by the URI parser. If the resulting URI.String() output is subsequently re-parsed via ParseURI, the injected fields can silently overwrite or hijack critical configuration parameters, forcing the client to use arbitrary connection settings or alternate TLS files.

---

Vulnerability Details

Mechanism The vulnerability lies within the lack of proper escaping when compiling connection string components into a raw URL format:

go // Example of insecure string concatenation during URI building uri := fmt.Sprintf("amqps://user:pass@host/%s?certfile=%s&keyfile=%s", vhost, certPath, keyPath)

Because certPath and keyPath are not passed through url.QueryEscape, special URL characters preserve their control meanings. For instance, if a user supply a certificate path named: /tmp/cert=foo&keyfile=/evil/path

The generated string translates into: ...?certfile=/tmp/cert=foo&keyfile=/evil/path&keyfile=/original/path

When this string passes back through ParseURI (common in connection re-dial routines or configuration replication steps), standard URL parsing mechanics treat the string as multiple distinct parameters. Depending on map assignment order inside the parser, the injected keys take precedence over the original parameters.

Impact By manipulating the file paths used for TLS assets, an attacker or compromised local sub-system can: Inject arbitrary alternative options or override protocol settings. Substitute or switch keyfiles, leading to connection failures or the parsing of unauthorized cryptographic assets. Corrupt connection state variables, triggering application-layer failures during connection setup or recovery.

---

Attack Vector An attacker who has partial control over directory naming conventions or environmental variables used to specify local infrastructure paths can execute a parameter injection attack:

1. Path Creation: An attacker sets up a path containing deliberate URL parameter delimiters (e.g., /var/lib/certs/client.crt?cacertfile=/tmp/fakeca.crt&). 2. String Generation: The application serializes the active connection state or passes the paths down to an unescaped URI builder function. 3. Configuration Hijack: The URI string is generated with the injected parameter embedded into the query structure. When the client attempts to reuse or re-parse this connection string during a connection retry or worker spin-up, it parses the injected cacertfile parameter, loading a different, unverified Certificate Authority string.

Affected Software

1 affected componentFixes available
go/github.com/rabbitmq/amqp091-go<1.13.0
1.13.0

Remediation

Recommended actions to resolve this vulnerability, in priority order.

  1. Upgrade

    Upgrade go/github.com/rabbitmq/amqp091-go to a version that resolves this vulnerability.

    Fixed in 1.13.0
  2. Configuration

    In the AMQP client URI builder logic, ensure TLS filesystem paths used for `certfile` and `keyfile` are URL-encoded (e.g., via `url.QueryEscape`) before inserting them into the query string, rather than using direct formatting like `...?certfile=%s&keyfile=%s` with unescaped `certPath`/`keyPath`.

    AMQP client connection URI formatting (TLS parameters) URI query parameter encoding for certPath/keyPath (certfile/keyfile) = Use url.QueryEscape (or equivalent) when embedding certPath and keyPath into the URI query string instead of raw string concatenation

Event History

Sep 17, 2026
Advisory Published
via GitHub·05:03 PM
Data Sourced
via GitHub·05:03 PM
DescriptionWeaknessAffected Software

Frequently Asked Questions

1

When does the unsafe parsing behavior occur in practice?

It requires a TLS-related filesystem path, such as a certificate or key path, to contain query-string delimiters like & or =. The risk materializes when the generated URI.String() value is later passed back into ParseURI, allowing those delimiters to be treated as separate URI parameters.

2

What configuration can be changed through the injected parameters?

Injected query fields can overwrite or hijack critical connection configuration. The client may be forced to use arbitrary connection settings or alternate TLS files.

Contact

SecAlerts Pty Ltd.
132 Wickham Terrace
Fortitude Valley,
QLD 4006, Australia
info@secalerts.co
By using SecAlerts services, you agree to our services end-user license agreement. This website is safeguarded by reCAPTCHA and governed by the Google Privacy Policy and Terms of Service. All names, logos, and brands of products are owned by their respective owners, and any usage of these names, logos, and brands for identification purposes only does not imply endorsement. If you possess any content that requires removal, please get in touch with us.
© 2026 SecAlerts Pty Ltd.
ABN: 70 645 966 203, ACN: 645 966 203