PinchTab is a standalone HTTP server that gives AI agents direct control over a Chrome browser. PinchTab `v0.8.3` through `v0.8.5` allow arbitrary JavaScript execution through `POST /wait` and `POST /tabs/{id}/wait` when the request uses `fn` mode, even if `security.allowEvaluate` is disabled. `POST /evaluate` correctly enforces the `security.allowEvaluate` guard, which is disabled by default. However, in the affected releases, `POST /wait` accepted a user-controlled `fn` expression, embedded it directly into executable JavaScript, and evaluated it in the browser context without checking the same policy. This is a security-policy bypass rather than a separate authentication bypass. Exploitation still requires authenticated API access, but a caller with the server token can execute arbitrary JavaScript in a tab context even when the operator explicitly disabled JavaScript evaluation. The current worktree fixes this by applying the same policy boundary to `fn` mode in `/wait` that already exists on `/evaluate`, while preserving the non-code wait modes. As of time of publication, a patched version is not yet available.
PinchTab versions 0.8.3-0.8.5 contain a critical security policy bypass allowing authenticated users to execute arbitrary JavaScript in browser contexts via the /wait endpoint, circumventing the security.allowEvaluate restriction. This vulnerability affects AI agent control systems and automation platforms that rely on PinchTab for browser automation. Exploitation requires valid API authentication but completely bypasses intended security controls, making this a high-priority issue for organizations using PinchTab in production environments.
IMMEDIATE ACTIONS:
1. Identify all PinchTab instances running versions 0.8.3-0.8.5 across your infrastructure
2. Disable or restrict network access to affected PinchTab servers immediately
3. Audit API token usage and revoke any suspicious or unnecessary tokens
4. Review browser automation logs for suspicious /wait endpoint calls with 'fn' parameters
5. Isolate affected systems from production networks if possible
PATCHING GUIDANCE:
1. Monitor PinchTab GitHub repository and official channels for patched version release
2. Prepare upgrade plan to patched version immediately upon availability
3. Test patched version in isolated environment before production deployment
4. Implement staged rollout to minimize service disruption
COMPENSATING CONTROLS (until patch available):
1. Implement network-level access controls restricting /wait endpoint access
2. Deploy WAF rules to block POST requests to /wait and /tabs/{id}/wait containing 'fn' parameters
3. Enforce strict API token management with short expiration times and minimal scope
4. Implement comprehensive logging and alerting on all /wait endpoint calls
5. Use network segmentation to isolate PinchTab servers from sensitive systems
6. Disable PinchTab instances not actively required for operations
DETECTION RULES:
1. Alert on POST requests to /wait or /tabs/*/wait endpoints containing 'fn' parameter
2. Monitor for unusual JavaScript patterns in fn parameters (eval, Function, setTimeout, etc.)
3. Track API token usage patterns and alert on tokens making /wait calls when /evaluate is disabled
4. Log all browser context executions and correlate with /wait endpoint calls
5. Monitor for data exfiltration attempts from browser contexts following /wait calls
الإجراءات الفورية:
1. تحديد جميع مثيلات PinchTab التي تعمل بالإصدارات 0.8.3-0.8.5 عبر البنية التحتية
2. تعطيل أو تقييد الوصول إلى الشبكة لخوادم PinchTab المتأثرة فوراً
3. تدقيق استخدام رموز API وإلغاء أي رموز مريبة أو غير ضرورية
4. مراجعة سجلات أتمتة المتصفح للبحث عن استدعاءات مريبة لنقطة نهاية /wait مع معاملات 'fn'
5. عزل الأنظمة المتأثرة عن شبكات الإنتاج إن أمكن
إرشادات التصحيح:
1. مراقبة مستودع PinchTab GitHub والقنوات الرسمية لإصدار نسخة مصححة
2. تحضير خطة ترقية للنسخة المصححة فوراً عند توفرها
3. اختبار النسخة المصححة في بيئة معزولة قبل نشر الإنتاج
4. تنفيذ طرح مرحلي لتقليل انقطاع الخدمة
الضوابط التعويضية (حتى توفر التصحيح):
1. تنفيذ ضوابط الوصول على مستوى الشبكة لتقييد الوصول إلى نقطة نهاية /wait
2. نشر قواعد WAF لحظر طلبات POST إلى /wait و /tabs/{id}/wait التي تحتوي على معاملات 'fn'
3. فرض إدارة صارمة لرموز API مع أوقات انتهاء قصيرة والحد الأدنى من النطاق
4. تنفيذ تسجيل شامل والتنبيه على جميع استدعاءات نقطة نهاية /wait
5. استخدام تقسيم الشبكة لعزل خوادم PinchTab عن الأنظمة الحساسة
6. تعطيل مثيلات PinchTab غير المطلوبة بنشاط للعمليات
قواعد الكشف:
1. التنبيه على طلبات POST إلى نقاط نهاية /wait أو /tabs/*/wait التي تحتوي على معامل 'fn'
2. مراقبة أنماط JavaScript غير العادية في معاملات fn (eval, Function, setTimeout, إلخ)
3. تتبع أنماط استخدام رموز API والتنبيه على الرموز التي تقوم بـ /wait عندما يكون /evaluate معطلاً
4. تسجيل جميع عمليات تنفيذ سياق المتصفح والربط مع استدعاءات نقطة نهاية /wait
5. مراقبة محاولات تسرب البيانات من سياقات المتصفح بعد استدعاءات /wait