Summary
Sunbird-Ed SunbirdEd-portal v1.13.4 disables TLS/SSL certificate validation in its HTTP client configuration by setting rejectUnauthorized: false.
This behavior allows attackers on the network path or controlling a rogue TLS endpoint to intercept, read, or modify supposedly secure traffic, exposing sensitive information and undermining the confidentiality guarantees of HTTPS.
Affected context
The vulnerability arises in SunbirdEd-portal when it performs outbound HTTPS requests using HTTP options that explicitly disable certificate verification (rejectUnauthorized: false).
It is most relevant in environments where:
- The portal communicates with backend services, APIs, or identity providers over TLS, and
- Network paths may be partially untrusted (e.g., shared infrastructure, cloud networks, Wi-Fi, or ISP-controlled segments).
In such setups, the trust that TLS is supposed to provide is weakened because any certificate, including self-signed or attacker-controlled ones, will be accepted.
Exploit preconditions
- Attack surface: Encrypted (HTTPS) connections initiated by the portal to its upstream services.
- Required access: Ability to position on or influence the network path between the portal and its target services (e.g., local network access, compromised router, malicious proxy, or upstream ISP control), or ability to operate a rogue TLS endpoint.
- Trigger point: Any outbound HTTPS request made by the portal while certificate verification is disabled.
- Why exploitation is possible: With
rejectUnauthorized: false, the client does not verify the server's certificate chain or hostname, allowing an attacker to present any certificate and successfully terminate TLS, enabling decryption and manipulation of traffic.
Why this happens
This issue is a textbook example of CWE-295: Improper Certificate Validation.
Instead of relying on the default behavior of the TLS stack to verify server identity against trusted certificate authorities and hostnames, the implementation explicitly instructs the HTTP client to skip these checks using rejectUnauthorized: false.
At an abstract level, this is an "accept all certificates" pattern: the application treats all TLS endpoints as equally trustworthy, collapsing the trust model of HTTPS and enabling transparent interception of "secure" connections.
Potential impact
- Attackers on the network path may decrypt and read sensitive data transmitted over HTTPS, including tokens, session identifiers, or user information.
- HTTPS requests and responses can be modified in transit, enabling injection or alteration of data and API parameters.
- Authentication flows and API calls can be hijacked, potentially leading to account compromise or privilege escalation in downstream systems.
- Integrity of data received from backend services can no longer be trusted, enabling subtle data corruption or response spoofing.
- Overall reduction in the security assurance of the deployment, as operators may falsely assume TLS is providing end-to-end confidentiality and integrity.
General mitigation guidance
Effective mitigation focuses on restoring strict TLS validation and designing for secure-by-default communication patterns:
- Remove any configuration that disables certificate verification (such as
rejectUnauthorized: false) and rely on default strict validation. - Use officially trusted certificates issued by reputable CAs, or configure a private CA properly installed in the system trust store when internal services are used.
- Apply explicit hostname verification where supported, ensuring the certificate's subject or SAN matches the expected service name.
- Centralize HTTP/TLS configuration so developers cannot easily bypass verification on a per-request basis.
- Prefer configuration-driven mechanisms (environment variables, secure configuration files) to manage trust anchors rather than hard-coding insecure flags in code.
- Implement the principle of least privilege for service credentials, so that any exposure of intercepted traffic yields minimal additional access.
How teams detect issues like this
Detecting improper certificate validation generally involves a combination of code inspection and policy enforcement:
- Use static analysis rules or grep-based checks to flag insecure options such as
rejectUnauthorized: false, "trustAll," or similar "accept all certificates" flags in HTTP/TLS clients. - Incorporate secure coding guidelines into code review, specifically requiring reviewers to verify that any TLS-related configuration preserves hostname and certificate chain validation.
- Enforce CI/CD policies that fail builds when insecure TLS patterns are introduced or modified.
- Maintain an inventory of outbound connections and periodically test them with tools that simulate invalid or self-signed certificates to confirm clients correctly reject them.
- Consider using automated application security testing tools that understand common TLS misconfiguration APIs in the project's language and framework.

