Summary
Chamilo LMS versions prior to 2.0.0-RC.3 expose an unauthenticated PENS plugin endpoint that accepts a user-controlled URL and fetches it server-side without filtering internal or private addresses.
This behavior enables Server-Side Request Forgery (SSRF), allowing remote attackers to probe internal services, access cloud metadata endpoints, or trigger actions on internal HTTP-based systems without valid credentials.
Affected context
The vulnerability occurs in the Chamilo LMS PENS (Package Exchange Notification Services) plugin endpoint at public/plugin/Pens/pens.php in versions prior to 2.0.0-RC.3.
It affects deployments where:
- The PENS plugin endpoint is reachable from the internet or untrusted networks
- Outbound HTTP/HTTPS requests from the Chamilo server to arbitrary hosts/ports are allowed
- Internal services, cloud metadata endpoints, or management APIs are accessible from the Chamilo host
The issue is present when the endpoint accepts user-controlled URLs without authentication or network egress restrictions.
Exploit preconditions
- Attack surface: HTTP(S) access to the
public/plugin/Pens/pens.phpendpoint from an attacker-controlled client. - Required access: No authentication required; the endpoint is publicly reachable in typical LMS deployments.
- Input control: Attacker can fully control the
package-urlparameter (and relatedreceipt/alertscallback parameters), which the application passes tocurl. - Network conditions: The Chamilo server must be able to initiate outbound connections to internal IP ranges or cloud metadata addresses (e.g.,
169.254.169.254). - Why exploitation is possible: The server performs server-side HTTP requests to arbitrary attacker-supplied URLs without authentication, IP allow/deny lists, or restrictions on internal/loopback address ranges.
Why this happens
This issue stems from trusting user-supplied URLs in a server-side HTTP client call without adequate validation or authorization, aligning with CWE-918: Server-Side Request Forgery (SSRF).
The PENS endpoint accepts parameters like package-url, receipt, and alerts, and directly feeds them into curl to fetch or notify remote services.
Because there is no authentication (CWE-306: Missing Authentication for Critical Function) and no enforcement of network-level or application-level restrictions on the target host, port, or scheme, attackers can coerce the server into making arbitrary outbound requests to internal or otherwise non-public endpoints.
Abstractly, this represents the insecure pattern: "untrusted URL input → server-side HTTP client → unrestricted outbound request" without strong isolation between external user input and internal network resources.
Potential impact
- Probing of internal network services (port scanning, service discovery) reachable from the Chamilo server.
- Access to cloud provider metadata services (e.g.,
http://169.254.169.254) which may expose IAM credentials, tokens, or instance metadata. - Interaction with internal HTTP APIs that are not directly exposed to the internet, potentially leaking configuration, logs, or sensitive data.
- Triggering state-changing operations (create/update/delete actions) on internal administrative or orchestration services via crafted
receiptoralertscallback URLs. - Assisting in lateral movement or privilege escalation by abusing internal management endpoints or credential-bearing responses.
- Bypassing network ACLs or firewalls that trust traffic originating from the Chamilo host.
General mitigation guidance
Effective mitigation focuses on restricting when and where the application issues server-side requests based on user-controlled URLs, and on reducing trust in the calling context:
- Enforce strong authentication and authorization on plugin endpoints that trigger outbound network calls, so only trusted, authenticated actors can supply URLs.
- Validate and constrain destination URLs:
- Restrict to an explicit allowlist of trusted domains or well-defined endpoints.
- Reject IP literals and hostnames that resolve to private, loopback, link-local, or link-local metadata ranges.
- Limit supported schemes to safe protocols (e.g., HTTPS) and disallow dangerous or unexpected schemes.
- Apply network egress controls at the infrastructure level (firewalls, security groups, egress proxies) so application containers/hosts cannot reach sensitive internal networks or metadata services by default.
- Normalize and resolve hostnames before enforcement, then apply checks on the resolved IP address to prevent DNS rebinding or indirect access to internal networks.
- Separate roles and privileges for components that must make outbound calls, using least privilege and isolating them from sensitive management networks.
- Adopt secure-by-default plugin designs where external callbacks or package URLs are chosen from system-managed configuration rather than directly from user input.
How teams detect issues like this
Detection can combine code-centric and operational approaches:
- Static analysis and code review:
- Search for use of HTTP clients (e.g.,
curl,file_get_contents, Guzzle, or similar libraries) that take URL or host information directly from request parameters. - Flag endpoints that make outbound network calls without authentication or authorization checks (patterns related to CWE-306 and CWE-918).
- Review plugins and integration points that handle "callback," "webhook," "notification," or "URL" parameters for insufficient validation and allowlisting.
- Configuration and policy checks:
- Enforce policies that require URL allowlisting for server-to-server calls originating from web-facing endpoints.
- Monitor CI/CD for new or changed routes that initiate outbound HTTP requests based on user input.
- Runtime and network monitoring:
- Inspect egress logs for unusual outbound requests to internal IP ranges, metadata service addresses, or unexpected domains originating from the web application.
- Set alerts on access to known cloud metadata addresses from application subnets.
- Automated SAST, DAST, and SSRF-focused scanners can be integrated into development and testing pipelines to highlight risky URL-handling patterns and externally triggerable SSRF behaviors.

