writeups
infoSelfhosted Iranian Bug Bounty ProgramPotential CWE-200

gRPC Server Reflection Exposed on a Production Endpoint

6 min read
  • Potential CWE-200

gRPC Server Reflection Exposed on a Production Endpoint#

Category: Information Disclosure / API Reconnaissance Severity: Informational Status: Closed — Intended Behavior Confirmed by Program Technology: gRPC, Protocol Buffers, grpcurl Initial Assessment: Potential CWE-200 Target: Redacted production gRPC endpoint


1. Summary#

During authorized bug bounty testing, I discovered that gRPC Server Reflection was enabled on a publicly accessible production endpoint.

The reflection service allowed unauthenticated clients to enumerate available gRPC services and retrieve service definitions and Protocol Buffers message schemas.

The exposed metadata provided visibility into the API surface, including service names, RPC methods, message structures, and HTTP binding annotations where available.

I initially reported this behavior as a potential information disclosure vulnerability.

The program subsequently confirmed that reflection was intentionally enabled to facilitate testing by bug bounty hunters. Therefore, the finding is documented as an informational research note rather than a confirmed security vulnerability.

2. Technical Background#

What is gRPC Server Reflection?#

gRPC Server Reflection is a protocol that allows clients and development tools to discover the services and message types supported by a gRPC server at runtime.

It can expose information such as:

  • Available service names.
  • RPC method names and signatures.
  • Request and response message definitions.
  • Nested message types and enumerations.
  • Protocol Buffer descriptors and available service annotations.

Tools such as grpcurl use reflection to interact with a gRPC server without requiring locally available .proto files.

Reflection is useful for development, debugging, and API exploration. However, when exposed in production, it can also simplify reconnaissance by making API metadata accessible to external clients.

Why it attracted attention#

The endpoint exposed a substantial API surface, including service definitions that appeared to relate to internal tooling and infrastructure.

The initial concern was whether this metadata revealed information that should not be publicly accessible and whether it could facilitate further attacks.

The presence of reflection alone, however, does not establish that the underlying services or their operations are accessible without authorization.

3. Proof of Concept#

The following commands illustrate how gRPC reflection can be inspected using grpcurl.

The examples use a redacted placeholder rather than the original production hostname.

Step 1 — Enumerate services#

bash
grpcurl <authorized-target>:443 list

This command requests the list of services advertised through the reflection interface.

Step 2 — Inspect a service definition#

bash
grpcurl <authorized-target>:443 describe <service-name>

When reflection is available, the response can contain RPC method signatures and associated message types.

Step 3 — Inspect a message schema#

bash
grpcurl <authorized-target>:443 describe <message-type>

This can reveal field names, field types, and message structure. It does not, by itself, retrieve actual application records or customer data.

Step 4 — Examine available annotations#

Where included in the returned descriptors, service definitions may expose HTTP binding annotations and other metadata.

Such annotations can help researchers understand the relationship between gRPC methods and HTTP API routes.

Evidence note: The original private submission included service enumeration and schema-inspection output. The public version omits production-specific inventories, sensitive route names, and internal implementation details.

4. Potential Security Implications#

Exposing reflection may make reconnaissance easier by reducing the effort required to understand an API.

Potential concerns include:

  • API surface discovery: External clients can enumerate advertised services and methods.
  • Schema disclosure: Message definitions can reveal the structure of application requests and responses.
  • Route discovery: Available HTTP binding annotations may expose API path patterns.
  • Implementation reconnaissance: Service names and metadata may reveal architectural components or internal terminology.
  • Targeted security testing: Discovered method definitions can help researchers identify areas requiring authorization and business-logic testing.

These are potential implications, not proof that any particular security boundary was violated.

5. Security Impact Assessment#

The initial report classified the finding as High severity, with a proposed CVSS 3.1 score of 7.5.

That rating assumed a high confidentiality impact. However, the evidence established the availability of API metadata, not unauthorized access to sensitive application data.

The following distinctions are important:

ObservationWhat it establishes
Reflection is accessibleThe reflection interface can be queried
Services can be enumeratedAdvertised service names are discoverable
Schemas can be retrievedMethod and message definitions are exposed
Sensitive fields appear in schemasField definitions are visible, not necessarily their values
Internal-looking service names appearThe service inventory reveals implementation terminology, not necessarily internal-only access
An operation succeeds without authorizationRequires separate testing and evidence

Based on the evidence in the original report, the High-severity classification was not independently established.

6. Program Response#

The bug bounty team responded in Persian:

این موضوع عامدانه و برای بهتر کردن تست باگ بانتی هانتر هاست

Translation:

This is intentional and is meant to improve testing for bug bounty hunters.

The response confirmed that enabling reflection was an intentional design decision intended to support researchers.

Consequently, the behavior was not treated as an independently reportable vulnerability on its own.

7. Resolution#

The finding was reclassified as an informational observation documenting the exposed reflection interface and the program's explanation.

No remediation is claimed, and no change to the production configuration was independently verified.

Any separate vulnerability discovered through API reconnaissance would require its own evidence, impact assessment, and report.

8. Lessons Learned#

This investigation reinforced several important lessons for API security research:

  1. Separate exposure from impact. Discovering metadata does not automatically establish a security vulnerability.
  2. Validate severity against evidence. A high CVSS confidentiality impact requires a demonstrated or otherwise well-supported confidentiality compromise.
  3. Distinguish schemas from data. A response type containing sensitive fields does not prove those fields can be read from real customer records.
  4. Treat internal naming as a lead, not proof. Internal-looking service names do not establish that the services are improperly accessible.
  5. Consider program intent and scope. A program's explicit explanation can materially change the assessment of a reported behavior.
  6. Report independent flaws independently. Authentication, authorization, and business-logic vulnerabilities discovered during reconnaissance should be assessed on their own merits.

9. References#

10. Conclusion#

This investigation identified publicly accessible gRPC Server Reflection on a production endpoint and demonstrated how service metadata could be enumerated and inspected.

The program confirmed that the configuration was intentional and designed to support bug bounty testing. The available evidence did not independently establish unauthorized access to sensitive data or an exploitable authorization weakness.

The finding is therefore retained as an informational API reconnaissance case study, documenting the technical observation, the program's response, and the importance of demonstrating concrete security impact before assigning vulnerability severity.